ENGINES: Add comparator to sort SaveStateDescriptors based on slot.

This commit is contained in:
Johannes Schickel 2016-02-25 19:13:10 +01:00
parent 47f82d439d
commit a155220100

View File

@ -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