Fix CA1825 warnings on empty array initialisation.
This commit is contained in:
committed by
abcdefg30
parent
727084c5fc
commit
07815143f1
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public class ClassicParallelProductionQueue : ProductionQueue
|
||||
{
|
||||
static readonly ActorInfo[] NoItems = { };
|
||||
static readonly ActorInfo[] NoItems = Array.Empty<ActorInfo>();
|
||||
|
||||
readonly Actor self;
|
||||
readonly ClassicParallelProductionQueueInfo info;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Primitives;
|
||||
@@ -35,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public class ClassicProductionQueue : ProductionQueue
|
||||
{
|
||||
static readonly ActorInfo[] NoItems = { };
|
||||
static readonly ActorInfo[] NoItems = Array.Empty<ActorInfo>();
|
||||
|
||||
readonly Actor self;
|
||||
readonly ClassicProductionQueueInfo info;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
@@ -21,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string Prerequisite = null;
|
||||
|
||||
[Desc("Only grant this prerequisite when you have these prerequisites.")]
|
||||
public readonly string[] RequiresPrerequisites = { };
|
||||
public readonly string[] RequiresPrerequisites = Array.Empty<string>();
|
||||
|
||||
[Desc("Only grant this prerequisite for certain factions.")]
|
||||
public readonly HashSet<string> Factions = new HashSet<string>();
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Traits;
|
||||
|
||||
@@ -24,7 +25,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string Name;
|
||||
|
||||
[Desc("Prerequisites to grant when this tech level is active.")]
|
||||
public readonly string[] Prerequisites = { };
|
||||
public readonly string[] Prerequisites = Array.Empty<string>();
|
||||
|
||||
IEnumerable<string> ITechTreePrerequisiteInfo.Prerequisites(ActorInfo info) { return Prerequisites; }
|
||||
|
||||
@@ -36,7 +37,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
readonly ProvidesTechPrerequisiteInfo info;
|
||||
bool enabled;
|
||||
|
||||
static readonly string[] NoPrerequisites = new string[0];
|
||||
static readonly string[] NoPrerequisites = Array.Empty<string>();
|
||||
|
||||
public string Name => info.Name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user