From a155220100205fef939892ca5d605ea2af24d5ba Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 25 Feb 2016 19:13:10 +0100 Subject: ENGINES: Add comparator to sort SaveStateDescriptors based on slot. --- engines/savestate.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 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 -- cgit v1.2.3