use ToList rather than List<T>.ctor

This commit is contained in:
Chris Forbes
2011-05-02 22:23:36 +12:00
parent bd0a953d66
commit 64782fb254

View File

@@ -120,7 +120,7 @@ namespace OpenRA.Traits
// No longer our ally; remove unit vis
if (oldStance == Stance.Ally)
{
var toRemove = new List<Actor>(vis.Select(a => a.Key).Where(a => a.Owner == player));
var toRemove = vis.Select(a => a.Key).Where(a => a.Owner == player).ToList();
foreach (var a in toRemove)
RemoveActor(a);
}