Fixed unnecessary zero-length array allocations
Changed all currently present zero-length array allocations in the codebase to use `Array.Empty` instead.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Activities;
|
||||
using OpenRA.Effects;
|
||||
@@ -26,10 +27,10 @@ namespace OpenRA.Mods.Common.Effects
|
||||
int remainingDelay;
|
||||
|
||||
public SpawnActorEffect(Actor actor)
|
||||
: this(actor, 0, new CPos[0], null) { }
|
||||
: this(actor, 0, Array.Empty<CPos>(), null) { }
|
||||
|
||||
public SpawnActorEffect(Actor actor, int delay)
|
||||
: this(actor, delay, new CPos[0], null) { }
|
||||
: this(actor, delay, Array.Empty<CPos>(), null) { }
|
||||
|
||||
public SpawnActorEffect(Actor actor, int delay, CPos[] pathAfterSpawn, Activity activityAtDestination)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user