1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-26 07:59:09 +00:00

Codechange: replace strnatcmp with C++ string capable version

This commit is contained in:
Rubidium
2023-04-27 15:39:10 +02:00
committed by rubidium42
parent df19673fbd
commit c829930440
22 changed files with 47 additions and 54 deletions

View File

@@ -58,7 +58,7 @@ bool FiosItem::operator< (const FiosItem &other) const
if ((_savegame_sort_order & SORT_BY_NAME) == 0 && (*this).mtime != other.mtime) {
r = (*this).mtime - other.mtime;
} else {
r = strnatcmp((*this).title, other.title);
r = StrNaturalCompare((*this).title, other.title);
}
if (r == 0) return false;
return (_savegame_sort_order & SORT_DESCENDING) ? r > 0 : r < 0;