Fix CA1862

This commit is contained in:
RoosterDragon
2024-11-13 19:02:20 +00:00
committed by Pavel Penev
parent ed90322a0b
commit 332ab244a7
5 changed files with 12 additions and 3 deletions

View File

@@ -130,7 +130,8 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
Console.WriteLine("\t\tIntoActor: " + undeploysInto);
}
if (artIni.Sections.Any(s => s.Name == building.ToLowerInvariant()))
var buildingLower = building.ToLowerInvariant();
if (artIni.Sections.Any(s => s.Name == buildingLower))
{
var artSection = artIni.GetSection(building);

View File

@@ -138,7 +138,8 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
Console.WriteLine("\t\tUseTilesetCode: false");
}
if (file.Sections.Any(s => s.Name == sequence.ToLowerInvariant()))
var sequenceLower = sequence.ToLowerInvariant();
if (file.Sections.Any(s => s.Name == sequenceLower))
{
var sequenceSection = file.GetSection(sequence);
var guard = sequenceSection.GetValue("Guard", string.Empty);