Simplify 'always true' expressions

Co-authored-by: atlimit8 <atlimit8-vcs@gmx.com>
This commit is contained in:
Eduardo Cáceres
2022-05-02 13:28:12 +02:00
committed by atlimit8
parent aa998a46d9
commit 8ced155ca3
2 changed files with 3 additions and 4 deletions

View File

@@ -133,7 +133,7 @@ namespace OpenRA.Mods.Cnc.Activities
foreach (var tile in self.World.Map.FindTilesInCircle(destination, max)) foreach (var tile in self.World.Map.FindTilesInCircle(destination, max))
{ {
if (teleporter.Owner.Shroud.IsExplored(tile) if (teleporter.Owner.Shroud.IsExplored(tile)
&& (restrictTo == null || (restrictTo != null && restrictTo.Contains(tile))) && (restrictTo == null || restrictTo.Contains(tile))
&& pos.CanEnterCell(tile)) && pos.CanEnterCell(tile))
return tile; return tile;
} }

View File

@@ -90,9 +90,8 @@ namespace OpenRA.Mods.Cnc.FileFormats
static uint LenBigNum(uint[] n, uint len) static uint LenBigNum(uint[] n, uint len)
{ {
uint i; var i = len - 1;
i = len - 1; while (n[i] == 0) i--;
while ((i >= 0) && (n[i] == 0)) i--;
return i + 1; return i + 1;
} }