aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:13:10 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commita155220100205fef939892ca5d605ea2af24d5ba (patch)
treee4952c25d2a4d8ea5673099c5febdc04e83f43a7
parent47f82d439d545a0173ae41d8572ac6e4ba47a5cd (diff)
downloadscummvm-rg350-a155220100205fef939892ca5d605ea2af24d5ba.tar.gz
scummvm-rg350-a155220100205fef939892ca5d605ea2af24d5ba.tar.bz2
scummvm-rg350-a155220100205fef939892ca5d605ea2af24d5ba.zip
ENGINES: Add comparator to sort SaveStateDescriptors based on slot.
-rw-r--r--engines/savestate.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/savestate.h b/engines/savestate.h
index 54eff0f8cb..21ade602fa 100644
--- a/engines/savestate.h
+++ b/engines/savestate.h
@@ -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