mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-28 23:40:47 -07:00
Strings should not be concatenated using '+' in a loop (#5664)
* Strings should not be concatenated using '+' in a loop * fix IDE0090 * undo GenerateLoadOrStore * prefer string interpolation * Update src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs Co-authored-by: Mary <thog@protonmail.com> --------- Co-authored-by: Mary <thog@protonmail.com>
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Ryujinx.Horizon.Sdk.Sm
|
||||
{
|
||||
@ -78,7 +79,7 @@ namespace Ryujinx.Horizon.Sdk.Sm
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string name = string.Empty;
|
||||
StringBuilder nameBuilder = new();
|
||||
|
||||
for (int index = 0; index < sizeof(ulong); index++)
|
||||
{
|
||||
@ -89,10 +90,10 @@ namespace Ryujinx.Horizon.Sdk.Sm
|
||||
break;
|
||||
}
|
||||
|
||||
name += (char)character;
|
||||
nameBuilder.Append((char)character);
|
||||
}
|
||||
|
||||
return name;
|
||||
return nameBuilder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user