From 77a6a9a30c37f39d1b3eab7ac709456ac8e04cb1 Mon Sep 17 00:00:00 2001 From: Adrian Frühwirth Date: Mon, 26 Mar 2018 00:49:33 +0200 Subject: COMPOSER: Let listSaves return list sorted on slot numbers --- engines/composer/detection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/composer') diff --git a/engines/composer/detection.cpp b/engines/composer/detection.cpp index dd1ce2751c..72a8f8256f 100644 --- a/engines/composer/detection.cpp +++ b/engines/composer/detection.cpp @@ -514,7 +514,6 @@ SaveStateList ComposerMetaEngine::listSaves(const char *target) const { Common::String pattern = Common::String::format("%s.??", target); filenames = saveFileMan->listSavefiles(pattern); - sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) SaveStateList saveList; for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) { @@ -531,6 +530,7 @@ SaveStateList ComposerMetaEngine::listSaves(const char *target) const { } } + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } -- cgit v1.2.3