Remove some misc redundancies

This commit is contained in:
ScottNZ
2013-11-12 17:40:34 +13:00
parent 8197f29606
commit 1394c1dcee
48 changed files with 104 additions and 103 deletions

View File

@@ -147,8 +147,7 @@ namespace OpenRA.Mods.RA
var toProcess = new Stack<int>();
toProcess.Push(d1);
var i = 0;
while (toProcess.Count() > 0)
while (toProcess.Any())
{
var current = toProcess.Pop();
if (!transientConnections.ContainsKey(current))
@@ -163,7 +162,6 @@ namespace OpenRA.Mods.RA
}
visited.Add(current);
i += 1;
}
return false;

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.RA
{
class PathfinderDebugOverlayInfo : Traits.TraitInfo<PathfinderDebugOverlay> { }
class PathfinderDebugOverlayInfo : TraitInfo<PathfinderDebugOverlay> { }
class PathfinderDebugOverlay : IRenderOverlay, IWorldLoaded
{
Dictionary<Player, int[,]> layers;

View File

@@ -32,7 +32,7 @@ namespace OpenRA.Mods.RA
}
}
public void WorldLoaded(OpenRA.World w, WorldRenderer wr)
public void WorldLoaded(World w, WorldRenderer wr)
{
// NOTE(jsd): 32 seems a sane default initial capacity for the total # of harvesters in a game. Purely a guesstimate.
claimByCell = new Dictionary<CPos, ResourceClaim>(32);