Simplify 'always true' expressions
Co-authored-by: atlimit8 <atlimit8-vcs@gmx.com>
This commit is contained in:
committed by
atlimit8
parent
aa998a46d9
commit
8ced155ca3
@@ -133,7 +133,7 @@ namespace OpenRA.Mods.Cnc.Activities
|
||||
foreach (var tile in self.World.Map.FindTilesInCircle(destination, max))
|
||||
{
|
||||
if (teleporter.Owner.Shroud.IsExplored(tile)
|
||||
&& (restrictTo == null || (restrictTo != null && restrictTo.Contains(tile)))
|
||||
&& (restrictTo == null || restrictTo.Contains(tile))
|
||||
&& pos.CanEnterCell(tile))
|
||||
return tile;
|
||||
}
|
||||
|
||||
@@ -90,9 +90,8 @@ namespace OpenRA.Mods.Cnc.FileFormats
|
||||
|
||||
static uint LenBigNum(uint[] n, uint len)
|
||||
{
|
||||
uint i;
|
||||
i = len - 1;
|
||||
while ((i >= 0) && (n[i] == 0)) i--;
|
||||
var i = len - 1;
|
||||
while (n[i] == 0) i--;
|
||||
return i + 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user