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

@@ -30,7 +30,7 @@ namespace OpenRA
{
var key = w.Key.Substring(w.Key.IndexOf('@') + 1);
if (widgets.ContainsKey(key))
throw new InvalidDataException("Widget has duplicate Key `{0}` at {1}".F(w.Key, w.Location));
throw new InvalidDataException($"Widget has duplicate Key `{w.Key}` at {w.Location}");
widgets.Add(key, w);
}
}
@@ -38,7 +38,7 @@ namespace OpenRA
public Widget LoadWidget(WidgetArgs args, Widget parent, string w)
{
if (!widgets.TryGetValue(w, out var ret))
throw new InvalidDataException("Cannot find widget with Id `{0}`".F(w));
throw new InvalidDataException($"Cannot find widget with Id `{w}`");
return LoadWidget(args, parent, ret);
}