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

Class compareSaveTimestamp

src/Menu/ListGamesState.cpp:61–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59};
60
61struct compareSaveTimestamp : public std::binary_function<SaveInfo&, SaveInfo&, bool>
62{
63 bool _reverse;
64
65 compareSaveTimestamp(bool reverse) : _reverse(reverse) {}
66
67 bool operator()(const SaveInfo &a, const SaveInfo &b) const
68 {
69 if (a.reserved == b.reserved)
70 {
71 return a.timestamp < b.timestamp;
72 }
73 else
74 {
75 return _reverse ? b.reserved : a.reserved;
76 }
77 }
78};
79
80/**
81 * Initializes all the elements in the Saved Game screen.

Callers 1

sortListMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected