Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
fixes 8645ed3
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
  • Loading branch information
YoshiRulz committed Dec 15, 2024
1 parent 8645ed3 commit 6cb19d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/BizHawk.Common/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public static byte[] ToCharCodepointArray(this string str)
/// <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;
Expand Down
2 changes: 1 addition & 1 deletion src/BizHawk.Emulation.Common/Database/Database.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static class Database
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)
Expand Down

0 comments on commit 6cb19d8

Please sign in to comment.