diff options
author | Marco Carvalho <marcolucio27@gmail.com> | 2023-10-05 07:41:00 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 12:41:00 +0200 |
commit | 7835968214241c37c677b6c5c82aa3353546de89 (patch) | |
tree | 70e4a1d5fbacf371d1d5eff1d6c025b7ff14f922 /src/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs | |
parent | 0aceb534cb34287e354f92c37a1b5ebf136e8e74 (diff) |
Strings should not be concatenated using '+' in a loop (#5664)1.1.1043
* 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>
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs index 7506f72a..cd9c7128 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs @@ -92,14 +92,14 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl private static string GetIndentation(int level) { - string indentation = string.Empty; + StringBuilder indentationBuilder = new(); for (int index = 0; index < level; index++) { - indentation += Tab; + indentationBuilder.Append(Tab); } - return indentation; + return indentationBuilder.ToString(); } } } |