aboutsummaryrefslogtreecommitdiff
path: root/src/ARMeilleure/Diagnostics/Symbols.cs
diff options
context:
space:
mode:
authorMarco Carvalho <marcolucio27@gmail.com>2023-10-05 07:41:00 -0300
committerGitHub <noreply@github.com>2023-10-05 12:41:00 +0200
commit7835968214241c37c677b6c5c82aa3353546de89 (patch)
tree70e4a1d5fbacf371d1d5eff1d6c025b7ff14f922 /src/ARMeilleure/Diagnostics/Symbols.cs
parent0aceb534cb34287e354f92c37a1b5ebf136e8e74 (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/ARMeilleure/Diagnostics/Symbols.cs')
-rw-r--r--src/ARMeilleure/Diagnostics/Symbols.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ARMeilleure/Diagnostics/Symbols.cs b/src/ARMeilleure/Diagnostics/Symbols.cs
index 86469d8b..bb2f5cef 100644
--- a/src/ARMeilleure/Diagnostics/Symbols.cs
+++ b/src/ARMeilleure/Diagnostics/Symbols.cs
@@ -1,6 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
+using System.Text;
namespace ARMeilleure.Diagnostics
{
@@ -48,14 +49,15 @@ namespace ARMeilleure.Diagnostics
ulong diff = address - symbol.Start;
ulong rem = diff % symbol.ElementSize;
- result = symbol.Name + "_" + diff / symbol.ElementSize;
+ StringBuilder resultBuilder = new();
+ resultBuilder.Append($"{symbol.Name}_{diff / symbol.ElementSize}");
if (rem != 0)
{
- result += "+" + rem;
+ resultBuilder.Append($"+{rem}");
}
- _symbols.TryAdd(address, result);
+ _symbols.TryAdd(address, resultBuilder.ToString());
return result;
}