Replace for(;;) with while (true).

This commit is contained in:
Paul Chote
2019-06-08 15:17:27 +01:00
committed by reaperrr
parent 4d8aaeb690
commit c253aaeb9d
9 changed files with 13 additions and 9 deletions

View File

@@ -164,7 +164,11 @@ namespace OpenRA
public static IEnumerable<T> Iterate<T>(this T t, Func<T, T> f)
{
for (;;) { yield return t; t = f(t); }
while (true)
{
yield return t;
t = f(t);
}
}
public static T MinBy<T, U>(this IEnumerable<T> ts, Func<T, U> selector)