Mop up active Stylecop nits.
Style consistency cleanup.
This commit is contained in:
@@ -89,8 +89,12 @@ namespace OpenRA
|
||||
var defaultSubCellIndex = (byte)DefaultSubCell;
|
||||
if (defaultSubCellIndex == byte.MaxValue)
|
||||
DefaultSubCell = (SubCell)(SubCellOffsets.Length / 2);
|
||||
else if (defaultSubCellIndex < (SubCellOffsets.Length > 1 ? 1 : 0) || defaultSubCellIndex >= SubCellOffsets.Length)
|
||||
throw new InvalidDataException("Subcell default index must be a valid index into the offset triples and must be greater than 0 for mods with subcells");
|
||||
else
|
||||
{
|
||||
var minSubCellOffset = SubCellOffsets.Length > 1 ? 1 : 0;
|
||||
if (defaultSubCellIndex < minSubCellOffset || defaultSubCellIndex >= SubCellOffsets.Length)
|
||||
throw new InvalidDataException("Subcell default index must be a valid index into the offset triples and must be greater than 0 for mods with subcells");
|
||||
}
|
||||
|
||||
var makeCorners = Type == MapGridType.RectangularIsometric ?
|
||||
(Func<int[], WVec[]>)IsometricCellCorners : RectangularCellCorners;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenRA.Server
|
||||
// from `socket.Receive(rx)`.
|
||||
if (!Socket.Poll(0, SelectMode.SelectRead)) break;
|
||||
|
||||
if (0 < (len = Socket.Receive(rx)))
|
||||
if ((len = Socket.Receive(rx)) > 0)
|
||||
Data.AddRange(rx.Take(len));
|
||||
else
|
||||
{
|
||||
|
||||
@@ -385,7 +385,7 @@ namespace OpenRA.Mods.Cnc.FileFormats
|
||||
MulBignumWord(esi, globOne, tmp, 2 * len);
|
||||
if ((*edi & 0x8000) == 0)
|
||||
{
|
||||
if (0 != SubBigNum((uint*)esi, (uint*)esi, g1, 0, (int)len))
|
||||
if (SubBigNum((uint*)esi, (uint*)esi, g1, 0, (int)len) != 0)
|
||||
(*edi)--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,8 +116,8 @@ namespace OpenRA.Mods.Common.FileFormats
|
||||
var flags = (SoundFlags)s.ReadByte();
|
||||
|
||||
var samples = outputSize;
|
||||
if (0 != (flags & SoundFlags.Stereo)) samples /= 2;
|
||||
if (0 != (flags & SoundFlags._16Bit)) samples /= 2;
|
||||
if ((flags & SoundFlags.Stereo) != 0) samples /= 2;
|
||||
if ((flags & SoundFlags._16Bit) != 0) samples /= 2;
|
||||
return (float)samples / sampleRate;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user