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

@@ -142,7 +142,7 @@ namespace OpenRA.Mods.Cnc.FileFormats
type = stream.ReadASCII(4);
}
else
throw new NotSupportedException("Vqa uses unknown Subtype: {0}".F(type));
throw new NotSupportedException($"Vqa uses unknown Subtype: {type}");
}
/*var length = */stream.ReadUInt16();
@@ -217,7 +217,7 @@ namespace OpenRA.Mods.Cnc.FileFormats
break;
default:
if (length + stream.Position > stream.Length)
throw new NotSupportedException("Vqa uses unknown Subtype: {0}".F(type));
throw new NotSupportedException($"Vqa uses unknown Subtype: {type}");
stream.ReadBytes((int)length);
break;
}
@@ -420,7 +420,7 @@ namespace OpenRA.Mods.Cnc.FileFormats
vtprSize = subchunkLength;
return;
default:
throw new InvalidDataException("Unknown sub-chunk {0}".F(type));
throw new InvalidDataException($"Unknown sub-chunk {type}");
}
}
}
@@ -562,7 +562,7 @@ namespace OpenRA.Mods.Cnc.FileFormats
// Replicate previous
var srcIndex = destIndex - rpos;
if (srcIndex > destIndex)
throw new NotImplementedException("srcIndex > destIndex {0} {1}".F(srcIndex, destIndex));
throw new NotImplementedException($"srcIndex > destIndex {srcIndex} {destIndex}");
for (var j = 0; j < count; j++)
{
@@ -602,7 +602,7 @@ namespace OpenRA.Mods.Cnc.FileFormats
var count = count3 == 0x3F ? ctx.ReadWord() : count3 + 3;
var srcIndex = reverse ? destIndex - ctx.ReadWord() : ctx.ReadWord();
if (srcIndex >= destIndex)
throw new NotImplementedException("srcIndex >= destIndex {0} {1}".F(srcIndex, destIndex));
throw new NotImplementedException($"srcIndex >= destIndex {srcIndex} {destIndex}");
for (var end = destIndex + count; destIndex < end; destIndex++)
dest[destIndex] = dest[srcIndex++];