Fix CA1825 warnings on empty array initialisation.
This commit is contained in:
committed by
abcdefg30
parent
727084c5fc
commit
07815143f1
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
@@ -39,7 +40,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
public readonly string Palette = "chrome";
|
||||
|
||||
[Desc("Name(s) of AmmoPool(s) that use this decoration. Leave empty to include all pools.")]
|
||||
public readonly string[] AmmoPools = { };
|
||||
public readonly string[] AmmoPools = Array.Empty<string>();
|
||||
|
||||
public override object Create(ActorInitializer init) { return new WithAmmoPipsDecoration(init.Self, this); }
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
class WithCrateBodyInfo : TraitInfo, Requires<RenderSpritesInfo>, IRenderActorPreviewSpritesInfo
|
||||
{
|
||||
[Desc("Easteregg sequences to use in December.")]
|
||||
public readonly string[] XmasImages = { };
|
||||
public readonly string[] XmasImages = Array.Empty<string>();
|
||||
|
||||
[Desc("Terrain types on which to display WaterSequence.")]
|
||||
public readonly HashSet<string> WaterTerrainTypes = new HashSet<string> { "Water" };
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
@@ -20,7 +21,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
class WithDeadBridgeSpriteBodyInfo : WithSpriteBodyInfo
|
||||
{
|
||||
[ActorReference]
|
||||
public readonly string[] RampActors = { };
|
||||
public readonly string[] RampActors = Array.Empty<string>();
|
||||
|
||||
[Desc("Offset to search for the 'A' neighbour")]
|
||||
public readonly CVec AOffset = CVec.Zero;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
@@ -41,7 +42,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
public readonly int BlinkInterval = 5;
|
||||
|
||||
[Desc("A pattern of ticks (BlinkInterval long) where the decoration is visible or hidden.")]
|
||||
public readonly BlinkState[] BlinkPattern = { };
|
||||
public readonly BlinkState[] BlinkPattern = Array.Empty<BlinkState>();
|
||||
|
||||
[Desc("Override blink conditions to use when defined conditions are enabled.",
|
||||
"A dictionary of [condition string]: [pattern].")]
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
@@ -20,7 +21,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
class WithGateSpriteBodyInfo : WithSpriteBodyInfo, IWallConnectorInfo, Requires<GateInfo>
|
||||
{
|
||||
[Desc("Cells (outside the gate footprint) that contain wall cells that can connect to the gate")]
|
||||
public readonly CVec[] WallConnections = { };
|
||||
public readonly CVec[] WallConnections = Array.Empty<CVec>();
|
||||
|
||||
[Desc("Wall type for connections")]
|
||||
public readonly string Type = "wall";
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
@@ -35,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
public readonly Dictionary<string, string[]> AttackSequences = new Dictionary<string, string[]>();
|
||||
|
||||
[SequenceReference]
|
||||
public readonly string[] IdleSequences = { };
|
||||
public readonly string[] IdleSequences = Array.Empty<string>();
|
||||
|
||||
[SequenceReference]
|
||||
public readonly string[] StandSequences = { "stand" };
|
||||
|
||||
Reference in New Issue
Block a user