MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / compareSaveName

Class compareSaveName

src/Menu/ListGamesState.cpp:42–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40{
41
42struct compareSaveName : public std::binary_function<SaveInfo&, SaveInfo&, bool>
43{
44 bool _reverse;
45
46 compareSaveName(bool reverse) : _reverse(reverse) {}
47
48 bool operator()(const SaveInfo &a, const SaveInfo &b) const
49 {
50 if (a.reserved == b.reserved)
51 {
52 return CrossPlatform::naturalCompare(a.displayName, b.displayName);
53 }
54 else
55 {
56 return _reverse ? b.reserved : a.reserved;
57 }
58 }
59};
60
61struct compareSaveTimestamp : public std::binary_function<SaveInfo&, SaveInfo&, bool>
62{

Callers 1

sortListMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected