Fix CA1865

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

View File

@@ -349,7 +349,7 @@ namespace OpenRA.Mods.Common.UpdateRules
public static void RenameKey(this MiniYamlNodeBuilder node, string newKey, bool preserveSuffix = true, bool includeRemovals = true)
{
var prefix = includeRemovals && node.IsRemoval() ? "-" : "";
var split = node.Key.IndexOf("@", StringComparison.Ordinal);
var split = node.Key.IndexOf('@');
if (preserveSuffix && split > -1)
node.Key = prefix + newKey + node.Key[split..];
else