use ToList rather than List<T>.ctor
This commit is contained in:
@@ -120,7 +120,7 @@ namespace OpenRA.Traits
|
|||||||
// No longer our ally; remove unit vis
|
// No longer our ally; remove unit vis
|
||||||
if (oldStance == Stance.Ally)
|
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)
|
foreach (var a in toRemove)
|
||||||
RemoveActor(a);
|
RemoveActor(a);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user