aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Utilities/StringUtils.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2021-09-15 01:24:49 +0200
committerGitHub <noreply@github.com>2021-09-15 01:24:49 +0200
commit5d08e9b495a2315e8a4758a8123466665085d044 (patch)
tree54a189acc7d9589e9678cc431b1bc9cca40682d0 /Ryujinx.HLE/Utilities/StringUtils.cs
parent3f2486342b3ef4610b6af6a52624614d2a7ad8ae (diff)
hos: Cleanup the project (#2634)
* hos: Cleanup the project Since a lot of changes has been done on the HOS project, there are some leftover here and there, or class just used in one service, things at wrong places, and more. This PR fixes that, additionnally to that, I've realigned some vars because I though it make the code more readable. * Address gdkchan feedback * addresses Thog feedback * Revert ElfSymbol
Diffstat (limited to 'Ryujinx.HLE/Utilities/StringUtils.cs')
-rw-r--r--Ryujinx.HLE/Utilities/StringUtils.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Ryujinx.HLE/Utilities/StringUtils.cs b/Ryujinx.HLE/Utilities/StringUtils.cs
index 0259a4fd..4142ab5b 100644
--- a/Ryujinx.HLE/Utilities/StringUtils.cs
+++ b/Ryujinx.HLE/Utilities/StringUtils.cs
@@ -12,7 +12,7 @@ namespace Ryujinx.HLE.Utilities
{
public static byte[] GetFixedLengthBytes(string inputString, int size, Encoding encoding)
{
- inputString = inputString + "\0";
+ inputString += "\0";
int bytesCount = encoding.GetByteCount(inputString);
@@ -76,8 +76,8 @@ namespace Ryujinx.HLE.Utilities
public static U8Span ReadUtf8Span(ServiceCtx context, int index = 0)
{
- ulong position = (ulong)context.Request.PtrBuff[index].Position;
- ulong size = (ulong)context.Request.PtrBuff[index].Size;
+ ulong position = context.Request.PtrBuff[index].Position;
+ ulong size = context.Request.PtrBuff[index].Size;
ReadOnlySpan<byte> buffer = context.Memory.GetSpan(position, (int)size);
@@ -93,7 +93,7 @@ namespace Ryujinx.HLE.Utilities
{
while (size-- > 0)
{
- byte value = context.Memory.Read<byte>((ulong)position++);
+ byte value = context.Memory.Read<byte>(position++);
if (value == 0)
{
@@ -133,4 +133,4 @@ namespace Ryujinx.HLE.Utilities
return i;
}
}
-}
+} \ No newline at end of file