Mop up active Stylecop nits.

Style consistency cleanup.
This commit is contained in:
Peter Antal
2018-02-25 12:41:54 -08:00
committed by Paul Chote
parent 701675fd4c
commit 9ce0bcb0b7
4 changed files with 10 additions and 6 deletions

View File

@@ -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;

View File

@@ -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
{