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:
parent
8645ed3bb9
commit
6cb19d8b8e
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue