mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C#: Compare CIL entities directly by handle rather than by label.
C#: Remove IDs from the CIL extractor and make consistent with C# extractor. C#: Fix method collisions.
This commit is contained in:
@@ -86,5 +86,19 @@ namespace Semmle.Util
|
||||
{
|
||||
items.ForEach(_ => { });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Computes a hash of a sequence.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the item.</typeparam>
|
||||
/// <param name="items">The list of items to hash.</param>
|
||||
/// <returns>The hash code.</returns>
|
||||
public static int SequenceHash<T>(this IEnumerable<T> items)
|
||||
{
|
||||
int h = 0;
|
||||
foreach (var i in items)
|
||||
h = h * 7 + i.GetHashCode();
|
||||
return h;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user