From 30ee70a9bc9529772198a51b1b9a605932d2ea96 Mon Sep 17 00:00:00 2001 From: Mary Date: Fri, 24 Jun 2022 19:04:57 +0200 Subject: time: Make TimeZoneRule blittable and avoid copies (#3361) * time: Make TimeZoneRule blittable and avoid copies This drastically reduce overhead of using TimeZoneRule around the codebase. Effect on games is unknown * Add missing Box type * Ensure we clean the structure still This doesn't perform any copies * Address gdkchan's comments * Simplify Box --- Ryujinx.HLE/Utilities/StringUtils.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Ryujinx.HLE/Utilities') diff --git a/Ryujinx.HLE/Utilities/StringUtils.cs b/Ryujinx.HLE/Utilities/StringUtils.cs index 3027139b..269f9b55 100644 --- a/Ryujinx.HLE/Utilities/StringUtils.cs +++ b/Ryujinx.HLE/Utilities/StringUtils.cs @@ -128,7 +128,7 @@ namespace Ryujinx.HLE.Utilities } } - public static int CompareCStr(ReadOnlySpan s1, ReadOnlySpan s2) + public static int CompareCStr(ReadOnlySpan s1, ReadOnlySpan s2) { int s1Index = 0; int s2Index = 0; @@ -142,11 +142,11 @@ namespace Ryujinx.HLE.Utilities return s2[s2Index] - s1[s1Index]; } - public static int LengthCstr(ReadOnlySpan s) + public static int LengthCstr(ReadOnlySpan s) { int i = 0; - while (s[i] != '\0') + while (s[i] != 0) { i++; } -- cgit v1.2.3