Replace $"{a}{b}" and similar with concatenation
This commit is contained in:
parent
3b2f890f24
commit
a2a5ec7566
|
@ -59,7 +59,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
int tone = note % 12;
|
||||
int octave = note / 12;
|
||||
return $"{noteNames[tone]}{octave}";
|
||||
return noteNames[tone] + octave;
|
||||
}
|
||||
|
||||
//this isnt thoroughly debugged but it seems to work OK
|
||||
|
|
|
@ -413,7 +413,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void StartLogFile(bool append = false)
|
||||
{
|
||||
var data = Tracer.Header;
|
||||
_streamWriter = new StreamWriter($"{_baseName}{(_segmentCount == 0 ? string.Empty : $"_{_segmentCount}")}{_extension}", append);
|
||||
_streamWriter = new StreamWriter(
|
||||
string.Concat(_baseName, _segmentCount == 0 ? string.Empty : $"_{_segmentCount}", _extension),
|
||||
append);
|
||||
_streamWriter.WriteLine(data);
|
||||
if (append)
|
||||
{
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace BizHawk.Common.BufferExtensions
|
|||
|
||||
for (int i = 0; i < buffer.Length && i * 2 < hex.Length; i++)
|
||||
{
|
||||
var bytehex = $"{hex[i * 2]}{hex[(i * 2) + 1]}";
|
||||
var bytehex = hex[i * 2].ToString() + hex[(i * 2) + 1];
|
||||
buffer[i] = byte.Parse(bytehex, NumberStyles.HexNumber);
|
||||
}
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ namespace BizHawk.Common.BufferExtensions
|
|||
|
||||
for (int i = 0; i < buffer.Length && i * 4 < hex.Length; i++)
|
||||
{
|
||||
var shorthex = $"{hex[i * 4]}{hex[(i * 4) + 1]}{hex[(i * 4) + 2]}{hex[(i * 4) + 3]}";
|
||||
var shorthex = string.Concat(hex[i * 4], hex[(i * 4) + 1], hex[(i * 4) + 2], hex[(i * 4) + 3]);
|
||||
buffer[i] = short.Parse(shorthex, NumberStyles.HexNumber);
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ namespace BizHawk.Common.BufferExtensions
|
|||
|
||||
for (int i = 0; i < buffer.Length && i * 4 < hex.Length; i++)
|
||||
{
|
||||
var ushorthex = $"{hex[i * 4]}{hex[(i * 4) + 1]}{hex[(i * 4) + 2]}{hex[(i * 4) + 3]}";
|
||||
var ushorthex = string.Concat(hex[i * 4], hex[(i * 4) + 1], hex[(i * 4) + 2], hex[(i * 4) + 3]);
|
||||
buffer[i] = ushort.Parse(ushorthex, NumberStyles.HexNumber);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,10 +40,8 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
BaseStream = null;
|
||||
}
|
||||
|
||||
private static string ReadTag(BinaryReader br)
|
||||
{
|
||||
return $"{br.ReadChar()}{br.ReadChar()}{br.ReadChar()}{br.ReadChar()}";
|
||||
}
|
||||
private static string ReadTag(BinaryReader br) =>
|
||||
string.Concat(br.ReadChar(), br.ReadChar(), br.ReadChar(), br.ReadChar());
|
||||
|
||||
protected static void WriteTag(BinaryWriter bw, string tag)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue