[core] perf tweak buffer_eq_icase_ssn()

personal/stbuehler/tests-path
Glenn Strauss 2022-06-26 23:37:42 -04:00
parent 5fef5e2208
commit aaf36f5838
1 changed files with 1 additions and 7 deletions

View File

@ -397,13 +397,7 @@ int buffer_eq_icase_ssn(const char * const a, const char * const b, const size_t
for (size_t i = 0; i < len; ++i) {
unsigned int ca = ((unsigned char *)a)[i];
unsigned int cb = ((unsigned char *)b)[i];
if (ca != cb) {
ca |= 0x20;
cb |= 0x20;
if (ca != cb) return 0;
if (!light_islower(ca)) return 0;
if (!light_islower(cb)) return 0;
}
if (ca != cb && ((ca ^ cb) != 0x20 || !light_isalpha(ca))) return 0;
}
return 1;
}