Replace F extension with string interpolation

This commit is contained in:
teinarss
2021-04-24 17:46:24 +02:00
committed by reaperrr
parent 1385aca783
commit 10676be377
300 changed files with 752 additions and 799 deletions

View File

@@ -61,7 +61,7 @@ namespace OpenRA
}
catch (YamlException e)
{
throw new YamlException("Actor type {0}: {1}".F(name, e.Message));
throw new YamlException($"Actor type {name}: {e.Message}");
}
}
@@ -76,8 +76,7 @@ namespace OpenRA
static TraitInfo LoadTraitInfo(ObjectCreator creator, string traitName, MiniYaml my)
{
if (!string.IsNullOrEmpty(my.Value))
throw new YamlException("Junk value `{0}` on trait node {1}"
.F(my.Value, traitName));
throw new YamlException($"Junk value `{my.Value}` on trait node {traitName}");
// HACK: The linter does not want to crash when a trait doesn't exist but only print an error instead
// ObjectCreator will only return null to signal us to abort here if the linter is running

View File

@@ -60,7 +60,7 @@ namespace OpenRA
}
catch (YamlException e)
{
throw new YamlException("Actor type {0}: {1}".F(a.Name, e.Message));
throw new YamlException($"Actor type {a.Name}: {e.Message}");
}
}
}
@@ -75,7 +75,7 @@ namespace OpenRA
}
catch (YamlException e)
{
throw new YamlException("Projectile type {0}: {1}".F(weapon.Key, e.Message));
throw new YamlException($"Projectile type {weapon.Key}: {e.Message}");
}
}
@@ -89,7 +89,7 @@ namespace OpenRA
}
catch (YamlException e)
{
throw new YamlException("Weapon type {0}: {1}".F(weapon.Key, e.Message));
throw new YamlException($"Weapon type {weapon.Key}: {e.Message}");
}
}
}