Fix RCS1041
This commit is contained in:
@@ -959,6 +959,9 @@ dotnet_diagnostic.RCS1034.severity = warning
|
||||
# Remove argument list from attribute.
|
||||
dotnet_diagnostic.RCS1039.severity = warning
|
||||
|
||||
# Remove empty initializer.
|
||||
dotnet_diagnostic.RCS1041.severity = warning
|
||||
|
||||
# Remove enum default underlying type.
|
||||
dotnet_diagnostic.RCS1042.severity = warning
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace OpenRA.Primitives
|
||||
|
||||
public static BitSet<T> FromStringsNoAlloc(string[] values)
|
||||
{
|
||||
return new BitSet<T>(BitSetAllocator<T>.GetBitsNoAlloc(values)) { };
|
||||
return new BitSet<T>(BitSetAllocator<T>.GetBitsNoAlloc(values));
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace OpenRA.Primitives
|
||||
|
||||
public static LongBitSet<T> FromStringsNoAlloc(string[] values)
|
||||
{
|
||||
return new LongBitSet<T>(LongBitSetAllocator<T>.GetBitsNoAlloc(values)) { };
|
||||
return new LongBitSet<T>(LongBitSetAllocator<T>.GetBitsNoAlloc(values));
|
||||
}
|
||||
|
||||
public static void Reset()
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
|
||||
var eof = new ImageHeader { FileOffset = (uint)dataOffset };
|
||||
eof.WriteTo(bw);
|
||||
|
||||
var allZeroes = new ImageHeader { };
|
||||
var allZeroes = new ImageHeader();
|
||||
allZeroes.WriteTo(bw);
|
||||
|
||||
foreach (var f in compressedFrames)
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
[ActorReference]
|
||||
[Desc("Actor types that should be treated as veins for adjacency.")]
|
||||
public readonly HashSet<string> VeinholeActors = new() { };
|
||||
public readonly HashSet<string> VeinholeActors = new();
|
||||
|
||||
public override object Create(ActorInitializer init) { return new TSEditorResourceLayer(init.Self, this); }
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
[ActorReference]
|
||||
[Desc("Actor types that should be treated as veins for adjacency.")]
|
||||
public readonly HashSet<string> VeinholeActors = new() { };
|
||||
public readonly HashSet<string> VeinholeActors = new();
|
||||
|
||||
public override object Create(ActorInitializer init) { return new TSResourceLayer(init.Self, this); }
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
[ActorReference]
|
||||
[Desc("Actor types that should be treated as veins for adjacency.")]
|
||||
public readonly HashSet<string> VeinholeActors = new() { };
|
||||
public readonly HashSet<string> VeinholeActors = new();
|
||||
|
||||
void IMapPreviewSignatureInfo.PopulateMapPreviewSignatureCells(Map map, ActorInfo ai, ActorReference s, List<(MPos Uv, Color Color)> destinationBuffer)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
readonly Animation flag;
|
||||
readonly Animation circles;
|
||||
|
||||
readonly List<WPos> targetLineNodes = new() { };
|
||||
readonly List<WPos> targetLineNodes = new();
|
||||
List<CPos> cachedLocations;
|
||||
|
||||
public RallyPointIndicator(Actor building, RallyPoint rp)
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class ActorSpawnerInfo : ConditionalTraitInfo
|
||||
{
|
||||
[Desc("Type of ActorSpawner with which it connects.")]
|
||||
public readonly HashSet<string> Types = new() { };
|
||||
public readonly HashSet<string> Types = new();
|
||||
|
||||
public override object Create(ActorInitializer init) { return new ActorSpawner(this); }
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
[ActorReference]
|
||||
[FieldLoader.Require]
|
||||
public readonly HashSet<string> DockActors = new() { };
|
||||
public readonly HashSet<string> DockActors = new();
|
||||
|
||||
[VoiceReference]
|
||||
public readonly string Voice = "Action";
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[ActorReference]
|
||||
[FieldLoader.Require]
|
||||
public readonly HashSet<string> RepairActors = new() { };
|
||||
public readonly HashSet<string> RepairActors = new();
|
||||
|
||||
[VoiceReference]
|
||||
public readonly string Voice = "Action";
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[ActorReference]
|
||||
[FieldLoader.Require]
|
||||
[Desc("Actors that this actor can dock to and get rearmed by.")]
|
||||
public readonly HashSet<string> RearmActors = new() { };
|
||||
public readonly HashSet<string> RearmActors = new();
|
||||
|
||||
[Desc("Name(s) of AmmoPool(s) that use this trait to rearm.")]
|
||||
public readonly HashSet<string> AmmoPools = new() { "primary" };
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[ActorReference]
|
||||
[FieldLoader.Require]
|
||||
public readonly HashSet<string> RepairActors = new() { };
|
||||
public readonly HashSet<string> RepairActors = new();
|
||||
|
||||
[VoiceReference]
|
||||
public readonly string Voice = "Action";
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[ActorReference]
|
||||
[FieldLoader.Require]
|
||||
public readonly HashSet<string> RepairActors = new() { };
|
||||
public readonly HashSet<string> RepairActors = new();
|
||||
|
||||
public readonly WDist CloseEnough = WDist.FromCells(4);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string Owner = "Creeps";
|
||||
|
||||
[Desc("Type of ActorSpawner with which it connects.")]
|
||||
public readonly HashSet<string> Types = new() { };
|
||||
public readonly HashSet<string> Types = new();
|
||||
|
||||
public override void RulesetLoaded(Ruleset rules, ActorInfo ai)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user