Unstable v0.15.17.0 (Hex is out of town edition)
This commit is contained in:
@@ -187,5 +187,14 @@ namespace Barotrauma.Extensions
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
public static int FindIndex<T>(this IReadOnlyList<T> list, Predicate<T> predicate)
|
||||
{
|
||||
for (int i=0; i<list.Count; i++)
|
||||
{
|
||||
if (predicate(list[i])) { return i; }
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user