diff --git a/OpenRA.FileFormats/Exts.cs b/OpenRA.FileFormats/Exts.cs index 30a629c59d..70e816a04f 100755 --- a/OpenRA.FileFormats/Exts.cs +++ b/OpenRA.FileFormats/Exts.cs @@ -129,9 +129,9 @@ namespace OpenRA return xs.Except(ys).Concat(ys.Except(xs)); } - public static IEnumerable Iterate( this T t, Func f ) + public static IEnumerable Iterate(this T t, Func f) { - for(;;) { yield return t; t = f(t); } + for (;;) { yield return t; t = f(t); } } public static int NextPowerOf2(int v) @@ -157,7 +157,7 @@ namespace OpenRA return string.Join(j, ts.Select(t => t.ToString()).ToArray()); } - public static IEnumerable Append( this IEnumerable ts, params T[] moreTs) + public static IEnumerable Append(this IEnumerable ts, params T[] moreTs) { return ts.Concat(moreTs); } @@ -204,8 +204,8 @@ namespace OpenRA // If any duplicates were found, log it and throw a descriptive error if (dupKeys.Count > 0) { - string badKeysFormatted = String.Join(", ", dupKeys.Select(p => "{0}: [{1}]".F(logKey(p.Key), String.Join(",", p.Value.ToArray()))).ToArray()); - string msg = "{0}, duplicate values found for the following keys: {1}".F(debugName, badKeysFormatted); + var badKeysFormatted = string.Join(", ", dupKeys.Select(p => "{0}: [{1}]".F(logKey(p.Key), string.Join(",", p.Value.ToArray()))).ToArray()); + var msg = "{0}, duplicate values found for the following keys: {1}".F(debugName, badKeysFormatted); Log.Write("debug", msg); throw new ArgumentException(msg); } @@ -240,7 +240,7 @@ namespace OpenRA var result = 0; foreach (var b in bits) if (b) - result |= (1 << i++); + result |= 1 << i++; else i++; if (i > 33)