Fix CA1864
This commit is contained in:
committed by
Pavel Penev
parent
3259737774
commit
9f526610dd
@@ -858,6 +858,9 @@ dotnet_diagnostic.CA1858.severity = warning
|
|||||||
# Avoid using 'Enumerable.Any()' extension method.
|
# Avoid using 'Enumerable.Any()' extension method.
|
||||||
dotnet_diagnostic.CA1860.severity = warning
|
dotnet_diagnostic.CA1860.severity = warning
|
||||||
|
|
||||||
|
# Prefer the 'IDictionary.TryAdd(TKey, TValue)' method.
|
||||||
|
dotnet_diagnostic.CA1864.severity = suggestion # TODO: Change to warning once using .NET 8 or later.
|
||||||
|
|
||||||
# Cache and reuse 'JsonSerializerOptions' instances.
|
# Cache and reuse 'JsonSerializerOptions' instances.
|
||||||
dotnet_diagnostic.CA1869.severity = suggestion # TODO: Change to warning once using .NET 8 or later.
|
dotnet_diagnostic.CA1869.severity = suggestion # TODO: Change to warning once using .NET 8 or later.
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,7 @@ namespace OpenRA.Mods.Common.Installer
|
|||||||
source.Position += 13;
|
source.Position += 13;
|
||||||
|
|
||||||
// This does not apply on game relevant data.
|
// This does not apply on game relevant data.
|
||||||
if (!entries.ContainsKey(key))
|
entries.TryAdd(key, entry);
|
||||||
entries.Add(key, entry);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var node in actionYaml.Nodes)
|
foreach (var node in actionYaml.Nodes)
|
||||||
|
|||||||
@@ -72,8 +72,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Add power to dictionary if not in delay dictionary yet
|
// Add power to dictionary if not in delay dictionary yet
|
||||||
if (!waitingPowers.ContainsKey(sp))
|
waitingPowers.TryAdd(sp, 0);
|
||||||
waitingPowers.Add(sp, 0);
|
|
||||||
|
|
||||||
if (waitingPowers[sp] > 0)
|
if (waitingPowers[sp] > 0)
|
||||||
waitingPowers[sp]--;
|
waitingPowers[sp]--;
|
||||||
|
|||||||
Reference in New Issue
Block a user