Skip to content

Commit

Permalink
Fix CA1841
Browse files Browse the repository at this point in the history
  • Loading branch information
RoosterDragon authored and abcdefg30 committed Apr 16, 2023
1 parent 8fe82ed commit 07fb5e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Lint/CheckVoiceReferences.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void CheckVoices(ActorInfo actorInfo, Action<string> emitError, Ruleset rules, s
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}.");
}
}
Expand Down

0 comments on commit 07fb5e8

Please sign in to comment.