Fix CA1864

This commit is contained in:
RoosterDragon
2023-11-15 19:14:11 +00:00
committed by Pavel Penev
parent 3259737774
commit 9f526610dd
3 changed files with 5 additions and 4 deletions

View File

@@ -43,8 +43,7 @@ namespace OpenRA.Mods.Common.Installer
source.Position += 13;
// This does not apply on game relevant data.
if (!entries.ContainsKey(key))
entries.Add(key, entry);
entries.TryAdd(key, entry);
}
foreach (var node in actionYaml.Nodes)

View File

@@ -72,8 +72,7 @@ namespace OpenRA.Mods.Common.Traits
continue;
// Add power to dictionary if not in delay dictionary yet
if (!waitingPowers.ContainsKey(sp))
waitingPowers.Add(sp, 0);
waitingPowers.TryAdd(sp, 0);
if (waitingPowers[sp] > 0)
waitingPowers[sp]--;