Remove some needless allocations

This commit is contained in:
Paul Chote
2011-04-18 10:50:17 +12:00
parent 24908b7269
commit ca379ce007

View File

@@ -41,9 +41,10 @@ namespace OpenRA.Mods.Cnc
[Sync]
public bool Visible = true;
static readonly Renderable[] Nothing = { };
public IEnumerable<Renderable> ModifyRender(Actor self, IEnumerable<Renderable> r)
{
return Visible ? r : new Renderable[] { };
return Visible ? r : Nothing;
}
}
}