Skip to content

Commit e7a0cc4

Browse files
authored
Improve MethodDef comparer (#203)
***NO_CI***
1 parent 0f0ac50 commit e7a0cc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MetadataProcessor.Shared/Tables/nanoMethodDefinitionTable.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ private sealed class MethodDefinitionComparer : IEqualityComparer<MethodDefiniti
3333
/// <inheritdoc/>
3434
public bool Equals(MethodDefinition lhs, MethodDefinition rhs)
3535
{
36-
return string.Equals(lhs.FullName, rhs.FullName, StringComparison.Ordinal);
36+
return lhs.MetadataToken.Equals(rhs.MetadataToken);
3737
}
3838

3939
/// <inheritdoc/>
4040
public int GetHashCode(MethodDefinition that)
4141
{
42-
return that.FullName.GetHashCode();
42+
return that.MetadataToken.GetHashCode();
4343
}
4444
}
4545

0 commit comments

Comments
 (0)