diff options
Diffstat (limited to 'scumm/dialogs.cpp')
-rw-r--r-- | scumm/dialogs.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp index d21d5ac86f..b4cf20869f 100644 --- a/scumm/dialogs.cpp +++ b/scumm/dialogs.cpp @@ -44,6 +44,8 @@ #include "backends/wince/CEKeysDialog.h" #endif +#include <memory> + using GUI::CommandSender; using GUI::StaticTextWidget; using GUI::kButtonWidth; @@ -255,19 +257,17 @@ Common::StringList generateSavegameList(ScummEngine *scumm, bool saveMode) { uint i = saveMode ? 1 : 0; bool avail_saves[81]; - SaveFileManager *mgr = OSystem::instance()->get_savefile_manager(); + const std::auto_ptr<SaveFileManager> mgr(OSystem::instance()->get_savefile_manager()); - scumm->listSavegames(avail_saves, ARRAYSIZE(avail_saves), mgr); + scumm->listSavegames(avail_saves, ARRAYSIZE(avail_saves), mgr.get()); for (; i < ARRAYSIZE(avail_saves); i++) { if (avail_saves[i]) - scumm->getSavegameName(i, name, mgr); + scumm->getSavegameName(i, name, mgr.get()); else name[0] = 0; l.push_back(name); } - delete mgr; - return l; } |