diff options
author | Filippos Karapetis | 2011-11-26 22:37:44 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-11-26 22:37:44 +0200 |
commit | 09349c2bcac228fe92ab05b4c4004881347697a3 (patch) | |
tree | 3bf6e78ff81392d71d4418ac32681ede346c1f7c /engines | |
parent | 52ee29d5cd51f57c7c84905908e4f4520159bd94 (diff) | |
download | scummvm-rg350-09349c2bcac228fe92ab05b4c4004881347697a3.tar.gz scummvm-rg350-09349c2bcac228fe92ab05b4c4004881347697a3.tar.bz2 scummvm-rg350-09349c2bcac228fe92ab05b4c4004881347697a3.zip |
TOLTECS: Don't call c_str() on the return value of Common::String::format()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/toltecs/menu.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp index 5ff0019d31..00a0372e99 100644 --- a/engines/toltecs/menu.cpp +++ b/engines/toltecs/menu.cpp @@ -253,8 +253,8 @@ void MenuSystem::initMenu(MenuID menuID) { addClickTextItem(kItemIdSavegameDown, 0, 195, 545, 1, "\\", 255, 253); addClickTextItem(kItemIdCancel, 0, 275, 320, 0, _vm->getSysString(kStrCancel), 255, 253); for (int i = 1; i <= 7; i++) { - const char *saveDesc = Common::String::format("SAVEGAME %d", i).c_str(); - addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 115 + 20 * (i - 1), 300, 0, saveDesc, 231, 234); + Common::String saveDesc = Common::String::format("SAVEGAME %d", i); + addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 115 + 20 * (i - 1), 300, 0, saveDesc.c_str(), 231, 234); } loadSavegamesList(); setSavegameCaptions(); @@ -265,8 +265,8 @@ void MenuSystem::initMenu(MenuID menuID) { addClickTextItem(kItemIdSavegameDown, 0, 195, 545, 1, "\\", 255, 253); addClickTextItem(kItemIdCancel, 0, 275, 320, 0, _vm->getSysString(kStrCancel), 255, 253); for (int i = 1; i <= 7; i++) { - const char *saveDesc = Common::String::format("SAVEGAME %d", i).c_str(); - addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 115 + 20 * (i - 1), 300, 0, saveDesc, 231, 234); + Common::String saveDesc = Common::String::format("SAVEGAME %d", i); + addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 115 + 20 * (i - 1), 300, 0, saveDesc.c_str(), 231, 234); } newSlotNum = loadSavegamesList() + 1; _savegames.push_back(SavegameItem(newSlotNum, Common::String::format("GAME %03d", _savegames.size() + 1))); |