Fix CA1841

This commit is contained in:
RoosterDragon
2023-03-12 16:26:17 +00:00
committed by abcdefg30
parent 8fe82ed976
commit 07fb5e8027
2 changed files with 4 additions and 1 deletions

View File

@@ -741,6 +741,9 @@ dotnet_diagnostic.CA1839.severity = warning
# Use Environment.CurrentManagedThreadId instead of Thread.CurrentThread.ManagedThreadId.
dotnet_diagnostic.CA1840.severity = warning
# Prefer Dictionary Contains methods.
dotnet_diagnostic.CA1841.severity = warning
# Do not use 'WhenAll' with a single task.
dotnet_diagnostic.CA1842.severity = warning

View File

@@ -66,7 +66,7 @@ namespace OpenRA.Mods.Common.Lint
if (string.IsNullOrEmpty(voice))
continue;
if (!soundInfo.Voices.Keys.Contains(voice))
if (!soundInfo.Voices.ContainsKey(voice))
emitError($"Actor {actorInfo.Name} using voice set {voiceSet} does not define {voice} voice required by {traitInfo}.");
}
}