1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 18:19:43 +01:00

Use SDL_tolower() instead of libc tolower() in compare_nocase()

This is to avoid having to depend on libc as much as possible.
This commit is contained in:
Misa 2020-07-03 21:48:07 -07:00 committed by Ethan Lee
parent 8366e08fbe
commit fbfeeaccd1

View file

@ -67,9 +67,9 @@ bool compare_nocase (std::string first, std::string second)
unsigned int i=0; unsigned int i=0;
while ( (i<first.length()) && (i<second.length()) ) while ( (i<first.length()) && (i<second.length()) )
{ {
if (tolower(first[i])<tolower(second[i])) if (SDL_tolower(first[i])<SDL_tolower(second[i]))
return true; return true;
else if (tolower(first[i])>tolower(second[i])) else if (SDL_tolower(first[i])>SDL_tolower(second[i]))
return false; return false;
++i; ++i;
} }