mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 20:17:49 +00:00
ENGINES: Add comparator to sort SaveStateDescriptors based on slot.
This commit is contained in:
parent
47f82d439d
commit
a155220100
@ -27,7 +27,6 @@
|
||||
#include "common/str.h"
|
||||
#include "common/ptr.h"
|
||||
|
||||
|
||||
namespace Graphics {
|
||||
struct Surface;
|
||||
}
|
||||
@ -205,5 +204,13 @@ private:
|
||||
/** List of savestates. */
|
||||
typedef Common::Array<SaveStateDescriptor> SaveStateList;
|
||||
|
||||
/**
|
||||
* Comparator object to compare SaveStateDescriptor's based on slot.
|
||||
*/
|
||||
struct SaveStateDescriptorSlotComparator {
|
||||
bool operator()(const SaveStateDescriptor &x, const SaveStateDescriptor &y) const {
|
||||
return x.getSaveSlot() < y.getSaveSlot();
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user