From db2e0fb0423b575151fde09256c9ccb10ee824e5 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 28 Dec 2011 01:51:09 +0100 Subject: KYRA: Slight cleanup in the transfer party code. --- engines/kyra/chargen.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'engines') diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp index 50153d7de3..1093bec079 100644 --- a/engines/kyra/chargen.cpp +++ b/engines/kyra/chargen.cpp @@ -1529,14 +1529,13 @@ bool TransferPartyWiz::start() { } bool TransferPartyWiz::selectAndLoadTransferFile() { - for (int numLoops = 1; numLoops; numLoops--) { + do { _screen->copyPage(12, 0); _vm->_savegameFilename = transferFileDialogue(); - if (_vm->_savegameFilename.empty()) { - if (_vm->_gui->confirmDialogue2(15, 68, 1)) - numLoops++; - } - } + } while (_vm->_savegameFilename.empty() && _vm->_gui->confirmDialogue2(15, 68, 1)); + + if (_vm->_savegameFilename.empty()) + return false; if (_vm->_savegameFilename.equals(_vm->_saveLoadStrings[1])) return false; @@ -1586,7 +1585,7 @@ Common::String TransferPartyWiz::transferFileDialogue() { targets.push_back(*i); } - if (targets.begin() == targets.end()) + if (targets.empty()) return tfile; Common::String target = _vm->_gui->transferTargetMenu(targets); -- cgit v1.2.3