Return empty Enumerable immediately in InstantHit

...rather than allocating a compiler generated enumerable via 'yield'.
This commit is contained in:
reaperrr
2017-01-30 21:14:49 +01:00
parent c057acba7a
commit e2b0c5bce4

View File

@@ -10,6 +10,7 @@
#endregion
using System.Collections.Generic;
using System.Linq;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
@@ -75,7 +76,7 @@ namespace OpenRA.Mods.Common.Projectiles
public IEnumerable<IRenderable> Render(WorldRenderer wr)
{
yield break;
return Enumerable.Empty<IRenderable>();
}
}
}