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.Linq;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Widgets;
|
||||
@@ -20,7 +21,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
readonly World world;
|
||||
|
||||
int selectionHash;
|
||||
TraitPair<AutoTarget>[] actorStances = { };
|
||||
TraitPair<AutoTarget>[] actorStances = Array.Empty<TraitPair<AutoTarget>>();
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public StanceSelectorLogic(Widget widget, World world)
|
||||
|
||||
Reference in New Issue
Block a user