mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C#: Enable nullability checks on Semmle.Extraction.CIL
This commit is contained in:
@@ -64,7 +64,7 @@ namespace Semmle.Util
|
||||
/// Enumerates a possibly null enumerable.
|
||||
/// If the enumerable is null, the list is empty.
|
||||
/// </summary>
|
||||
public static IEnumerable<T> EnumerateNull<T>(this IEnumerable<T> items)
|
||||
public static IEnumerable<T> EnumerateNull<T>(this IEnumerable<T>? items)
|
||||
{
|
||||
if (items == null) yield break;
|
||||
foreach (var item in items) yield return item;
|
||||
@@ -93,7 +93,7 @@ namespace Semmle.Util
|
||||
/// <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) where T: notnull
|
||||
public static int SequenceHash<T>(this IEnumerable<T> items) where T : notnull
|
||||
{
|
||||
int h = 0;
|
||||
foreach (var i in items)
|
||||
|
||||
Reference in New Issue
Block a user