Fix StyleCop warnings in OpenRA.Game

This commit is contained in:
Hellhake
2015-01-01 23:04:18 +01:00
parent e9989496c4
commit 5a97a4b63b
119 changed files with 547 additions and 529 deletions

View File

@@ -32,16 +32,16 @@ namespace OpenRA.Primitives
public static int GetValue(string[] val)
{
return val.Select( a => bits[a] ).Aggregate( 0, (a,b) => a | b );
return val.Select(a => bits[a]).Aggregate(0, (a, b) => a | b);
}
public static IEnumerable<string> GetStrings(int val)
{
for( var i = 0; i < 32; i++ )
for (var i = 0; i < 32; i++)
{
var x = 1 << i;
if ((val & x) != 0)
yield return bits.Single( a => a.Value == x ).Key;
yield return bits.Single(a => a.Value == x).Key;
}
}
}
@@ -58,7 +58,7 @@ namespace OpenRA.Primitives
return BitAllocator<T>.GetStrings(Value).JoinWith(",");
}
public static bool operator ==(Bits<T> me, Bits<T> other) { return (me.Value == other.Value); }
public static bool operator ==(Bits<T> me, Bits<T> other) { return me.Value == other.Value; }
public static bool operator !=(Bits<T> me, Bits<T> other) { return !(me == other); }
public bool Equals(Bits<T> other) { return other == this; }