Skip to content

Commit

Permalink
[runtime] Simplify code to use existing local variable (#15441)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne authored Jul 13, 2022
1 parent bdfdd19 commit 3c95b65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ObjCRuntime/Class.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ unsafe static bool CompareTokenReference (string? asm_name, int mod_token, int t
if ((token_reference & 0x1) == 0x1) {
// full token reference
var idx = (int) (token_reference >> 1);
var entry = Runtime.options->RegistrationMap->full_token_references + (IntPtr.Size + 8) * idx;
var entry = map->full_token_references + (IntPtr.Size + 8) * idx;
// first compare what's most likely to fail (the type's metadata token)
var token = (uint) Marshal.ReadInt32 (entry + IntPtr.Size + 4);
type_token |= 0x02000000 /* TypeDef - the token type is explicit in the full token reference, but not present in the type_token argument, so we have to add it before comparing */;
Expand Down

5 comments on commit 3c95b65

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.