Skip to content

Commit

Permalink
Auto-format source code
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions Autoformatter committed May 11, 2023
1 parent bf47496 commit c28004c
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions src/ObjCRuntime/Class.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ unsafe static IntPtr FindClass (Type type, out bool is_custom_type)
return IntPtr.Zero;
} else {
#endif // NET
mod_token = type.Module.MetadataToken;
type_token = type.MetadataToken & ~0x02000000 /* TokenType.TypeDef */;
mod_token = type.Module.MetadataToken;
type_token = type.MetadataToken & ~0x02000000 /* TokenType.TypeDef */;
#if NET
}
#endif // NET
Expand Down Expand Up @@ -619,7 +619,7 @@ internal unsafe static uint GetTokenReference (Type type, bool throw_exception =
#endif
} else {
#endif // NET
token = GetFullTokenReference (asm_name, type.Module.MetadataToken, type.MetadataToken);
token = GetFullTokenReference (asm_name, type.Module.MetadataToken, type.MetadataToken);
#if NET
}
#endif // NET
Expand Down
18 changes: 9 additions & 9 deletions src/ObjCRuntime/Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1846,17 +1846,17 @@ static void TryReleaseINativeObject (INativeObject? obj)
return rv;
} else {
#endif
unsafe {
var map = options->RegistrationMap;
if (map is not null) {
var token = Class.GetTokenReference (type, throw_exception: false);
if (token != INVALID_TOKEN_REF) {
var wrapper_token = xamarin_find_protocol_wrapper_type (token);
if (wrapper_token != INVALID_TOKEN_REF)
return Class.ResolveTypeTokenReference (wrapper_token);
}
unsafe {
var map = options->RegistrationMap;
if (map is not null) {
var token = Class.GetTokenReference (type, throw_exception: false);
if (token != INVALID_TOKEN_REF) {
var wrapper_token = xamarin_find_protocol_wrapper_type (token);
if (wrapper_token != INVALID_TOKEN_REF)
return Class.ResolveTypeTokenReference (wrapper_token);
}
}
}
#if NET
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion tools/common/StaticRegistrar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5456,7 +5456,7 @@ public static bool IsTrimmed (MemberReference tr, AnnotationStore annotations)

if (annotations.IsMarked (tr))
return false;

if (annotations.IsMarked (tr.Resolve ()))
return false;

Expand Down
2 changes: 1 addition & 1 deletion tools/dotnet-linker/AppBundleRewriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ static string GetMethodSignature (MethodDefinition method)
}
}

public TypeReference System_Diagnostics_CodeAnalysis_DynamicDependencyAttribute {
public TypeReference System_Diagnostics_CodeAnalysis_DynamicDependencyAttribute {
get {
return GetTypeReference (CorlibAssembly, "System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute", out var _);
}
Expand Down
2 changes: 1 addition & 1 deletion tools/dotnet-linker/CecilExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static MethodReference CreateMethodReferenceOnGenericType (this TypeRefer
return rv;
}

public static GenericInstanceType CreateGenericInstanceType (this TypeReference type, params TypeReference[] genericTypeArguments)
public static GenericInstanceType CreateGenericInstanceType (this TypeReference type, params TypeReference [] genericTypeArguments)
{
var git = new GenericInstanceType (type);
git.GenericArguments.AddRange (genericTypeArguments);
Expand Down
10 changes: 5 additions & 5 deletions tools/dotnet-linker/Steps/ConfigurationAwareStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public abstract class ConfigurationAwareStep : BaseStep {
get { return DerivedLinkContext.App; }
}

protected void Report (params Exception[] exceptions)
protected void Report (params Exception [] exceptions)
{
Report ((IList<Exception>) exceptions);
}
Expand Down Expand Up @@ -104,22 +104,22 @@ bool CollectProductExceptions (Exception e, [NotNullWhen (true)] out List<Produc
return false;
}

protected virtual Exception[] Fail (AssemblyDefinition assembly, Exception e)
protected virtual Exception [] Fail (AssemblyDefinition assembly, Exception e)
{
return CollectExceptions (e, () => ErrorHelper.CreateError (ErrorCode, Errors.MX_ConfigurationAwareStepWithAssembly, Name, assembly?.FullName, e.Message));
}

protected virtual Exception[] Fail (Exception e)
protected virtual Exception [] Fail (Exception e)
{
return CollectExceptions (e, () => ErrorHelper.CreateError (ErrorCode | 1, Errors.MX_ConfigurationAwareStep, Name, e.Message));
}

protected virtual Exception[] FailEnd (Exception e)
protected virtual Exception [] FailEnd (Exception e)
{
return CollectExceptions (e, () => ErrorHelper.CreateError (ErrorCode | 2, Errors.MX_ConfigurationAwareStep, Name, e.Message));
}

Exception[] CollectExceptions (Exception e, Func<ProductException> createException)
Exception [] CollectExceptions (Exception e, Func<ProductException> createException)
{
// Detect if we're reporting one or more ProductExceptions (and no other exceptions), and in that case
// report the product exceptions as top-level exceptions + the step-specific exception at the end,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ List<TypeData> GetTypesToRegister (TypeDefinition registrarType, AssemblyTrampol

// Skip any types that are not defined in the current assembly
types.RemoveAll (v => v.Definition.Module.Assembly != abr.CurrentAssembly);

// Skip any types that have been linked away
types.RemoveAll (v => IsTrimmed (v.Definition));

Expand Down

0 comments on commit c28004c

Please sign in to comment.