Codechange: introduce StrEqualsIgnoreCase/StrCompareIgnoreCase to replace strcasecmp

This commit is contained in:
Rubidium
2023-04-27 11:47:08 +02:00
committed by rubidium42
parent 36a0818bc5
commit 86786a7af6
15 changed files with 255 additions and 38 deletions

View File

@@ -630,7 +630,7 @@ bool GRFFileScanner::AddFile(const std::string &filename, size_t basepath_length
/* Because there can be multiple grfs with the same name, make sure we checked all grfs with the same name,
* before inserting the entry. So insert a new grf at the end of all grfs with the same name, instead of
* just after the first with the same name. Avoids doubles in the list. */
if (strcasecmp(c->GetName(), d->GetName()) <= 0) {
if (StrCompareIgnoreCase(c->GetName(), d->GetName()) <= 0) {
stop = true;
} else if (stop) {
break;