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.Primitives;
|
||||
using OpenRA.Traits;
|
||||
@@ -29,7 +30,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public class Targetable : ConditionalTrait<TargetableInfo>, ITargetable
|
||||
{
|
||||
protected static readonly string[] None = new string[] { };
|
||||
protected static readonly string[] None = Array.Empty<string>();
|
||||
protected Cloak[] cloaks;
|
||||
|
||||
public Targetable(Actor self, TargetableInfo info)
|
||||
|
||||
Reference in New Issue
Block a user