Avoid using LINQ on indexable collections (CA1826)
This commit is contained in:
committed by
abcdefg30
parent
68ca09e896
commit
7ba6a49378
@@ -153,6 +153,9 @@ dotnet_diagnostic.IDE1006.severity = warning
|
||||
# Avoid unnecessary zero-length array allocations.
|
||||
dotnet_diagnostic.CA1825.severity = warning
|
||||
|
||||
# Do not use Enumerable methods on indexable collections. Instead use the collection directly.
|
||||
dotnet_diagnostic.CA1826.severity = warning
|
||||
|
||||
# Use string.Contains(char) instead of string.Contains(string) with single characters.
|
||||
dotnet_diagnostic.CA1847.severity = warning
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (player.HasObjectives)
|
||||
{
|
||||
var mo = player.PlayerActor.Trait<MissionObjectives>();
|
||||
checkbox.GetText = () => mo.Objectives.First().Description;
|
||||
checkbox.GetText = () => mo.Objectives[0].Description;
|
||||
}
|
||||
|
||||
statusLabel.GetText = () => player.WinState == WinState.Won ? Accomplished :
|
||||
|
||||
Reference in New Issue
Block a user