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

@@ -69,14 +69,14 @@ namespace OpenRA
il.MarkLabel(l);
}
else if (type != typeof(int))
throw new NotImplementedException("SyncAttribute on member of unhashable type: {0}".F(type.FullName));
throw new NotImplementedException($"SyncAttribute on member of unhashable type: {type.FullName}");
il.Emit(OpCodes.Xor);
}
static Func<object, int> GenerateHashFunc(Type t)
{
var d = new DynamicMethod("hash_{0}".F(t.Name), typeof(int), new Type[] { typeof(object) }, t);
var d = new DynamicMethod($"hash_{t.Name}", typeof(int), new Type[] { typeof(object) }, t);
var il = d.GetILGenerator();
var this_ = il.DeclareLocal(t).LocalIndex;
il.Emit(OpCodes.Ldarg_0);