simplify CustomCollections.Contains

don't think we need an explanatory comment for the return value of a library function
This commit is contained in:
Morilli 2025-06-18 09:40:21 +02:00
parent 515b510da0
commit 1a438c6a8c
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ namespace BizHawk.Common
public virtual void Clear() => _list.Clear();
public virtual bool Contains(T item) => !(_list.BinarySearch(item) < 0); // can't use `!= -1`, BinarySearch can return multiple negative values
public virtual bool Contains(T item) => _list.BinarySearch(item) >= 0;
bool IList.Contains(object? item)
=> item is T item1 && Contains(item1);