aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Diagnostics
diff options
context:
space:
mode:
authorBerkan Diler <b.diler@gmx.de>2022-10-19 01:31:34 +0200
committerGitHub <noreply@github.com>2022-10-18 23:31:34 +0000
commitc40c3905e2836e8b105406430c33659a84c2e3ca (patch)
tree4a1ed99ae42fc57a0d6288680a319e594729a18d /Ryujinx.HLE/HOS/Diagnostics
parenta6cd044f0f675ee0bd9d3954228bbd3f2f992a22 (diff)
Avoid allocations in .Parse methods (#3760)
* Avoid allocations in .Parse methods Use the Span overloads of the Parse methods when possible to avoid string allocations and remove one unnecessarry array allocation * Avoid another string allocation
Diffstat (limited to 'Ryujinx.HLE/HOS/Diagnostics')
-rw-r--r--Ryujinx.HLE/HOS/Diagnostics/Demangler/Demangler.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Diagnostics/Demangler/Demangler.cs b/Ryujinx.HLE/HOS/Diagnostics/Demangler/Demangler.cs
index 1e621121..be5b7539 100644
--- a/Ryujinx.HLE/HOS/Diagnostics/Demangler/Demangler.cs
+++ b/Ryujinx.HLE/HOS/Diagnostics/Demangler/Demangler.cs
@@ -918,7 +918,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
return -1;
}
- return int.Parse(part.Substring(0, numberLength));
+ return int.Parse(part.AsSpan(0, numberLength));
}
private string ParseNumber(bool isSigned = false)