mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-11 08:49:50 +00:00
This commit is contained in:
parent
ebd4f32d15
commit
66a8db9dc5
11
src/fios.cpp
11
src/fios.cpp
@ -52,16 +52,15 @@ extern void GetOldSaveGameName(const char *file, char *title, const char *last);
|
||||
*/
|
||||
bool FiosItem::operator< (const FiosItem &other) const
|
||||
{
|
||||
bool r = false;
|
||||
int r = false;
|
||||
|
||||
if ((_savegame_sort_order & SORT_BY_NAME) == 0 && (*this).mtime != other.mtime) {
|
||||
r = (*this).mtime < other.mtime;
|
||||
r = (*this).mtime - other.mtime;
|
||||
} else {
|
||||
r = strcasecmp((*this).title, other.title) < 0;
|
||||
r = strcasecmp((*this).title, other.title);
|
||||
}
|
||||
|
||||
if (_savegame_sort_order & SORT_DESCENDING) r = !r;
|
||||
return r;
|
||||
if (r == 0) return false;
|
||||
return (_savegame_sort_order & SORT_DESCENDING) ? r > 0 : r < 0;
|
||||
}
|
||||
|
||||
FileList::~FileList()
|
||||
|
Loading…
Reference in New Issue
Block a user