mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-04 05:51:19 +12:00
GameList: Allow sorting by more columns (#1571)
This commit is contained in:
parent
2eec6b44c3
commit
f3fe6f3455
4 changed files with 84 additions and 18 deletions
|
@ -464,5 +464,34 @@ namespace iosu
|
|||
return static_cast<IOSUModule*>(&sIOSUModuleNNPDM);
|
||||
}
|
||||
|
||||
|
||||
bool GameListStat::LastPlayDate::operator<(const LastPlayDate& b) const
|
||||
{
|
||||
const auto& a = *this;
|
||||
|
||||
if(a.year < b.year)
|
||||
return true;
|
||||
if(a.year > b.year)
|
||||
return false;
|
||||
|
||||
// same year
|
||||
if(a.month < b.month)
|
||||
return true;
|
||||
if(a.month > b.month)
|
||||
return false;
|
||||
|
||||
// same year and month
|
||||
return a.day < b.day;
|
||||
}
|
||||
|
||||
bool GameListStat::LastPlayDate::operator==(const LastPlayDate& b) const
|
||||
{
|
||||
const auto& a = *this;
|
||||
return a.year == b.year &&
|
||||
a.month == b.month &&
|
||||
a.day == b.day;
|
||||
}
|
||||
std::weak_ordering GameListStat::LastPlayDate::operator<=>(const LastPlayDate& b) const = default;
|
||||
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue