From c456b0e0e3f22333c0267692fe939b648e7a96c1 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 28 Feb 2014 23:39:35 +0100 Subject: TOON: Reduce the scope of some more variables. --- engines/toon/detection.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/toon/detection.cpp') diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp index 7c6eae6c63..4f82514213 100644 --- a/engines/toon/detection.cpp +++ b/engines/toon/detection.cpp @@ -179,10 +179,9 @@ SaveStateList ToonMetaEngine::listSaves(const char *target) const { sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) SaveStateList saveList; - int slotNum = 0; for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) { // Obtain the last 3 digits of the filename, since they correspond to the save slot - slotNum = atoi(filename->c_str() + filename->size() - 3); + int slotNum = atoi(filename->c_str() + filename->size() - 3); if (slotNum >= 0 && slotNum <= 99) { Common::InSaveFile *file = saveFileMan->openForLoading(*filename); -- cgit v1.2.3