Fix typos

fixes 8645ed3bb
so the speedup isn't as big as with the broken code, but it's close
I think I'll be changing this again to use Span and I'll reprofile then
This commit is contained in:
YoshiRulz 2024-12-15 15:05:24 +10:00
parent 8645ed3bb9
commit 6cb19d8b8e
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ namespace BizHawk.Common.StringExtensions
/// <remarks>allocates a new char array only when necessary</remarks>
public static string ToUpperASCIIFast(this string str)
{
const ushort ASCII_UPCASE_MASK = 0b101111;
const ushort ASCII_UPCASE_MASK = 0b101_1111;
for (var i = 0; i < str.Length; i++)
{
if (str[i] is < 'a' or > 'z') continue;

View File

@ -38,7 +38,7 @@ namespace BizHawk.Emulation.Common
private static string FormatHash(string hash)
{
var i = hash.IndexOf(':');
return (i < 0 ? hash.Substring(startIndex: i + 1) : hash).ToUpperASCIIFast();
return (i < 0 ? hash : hash.Substring(startIndex: i + 1)).ToUpperASCIIFast();
}
private static void LoadDatabase_Escape(string line, bool inUser, bool silent)