[Scummvm-cvs-logs] scummvm master -> 09349c2bcac228fe92ab05b4c4004881347697a3
bluegr
md5 at scummvm.org
Sat Nov 26 21:38:50 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
09349c2bca TOLTECS: Don't call c_str() on the return value of Common::String::format()
Commit: 09349c2bcac228fe92ab05b4c4004881347697a3
https://github.com/scummvm/scummvm/commit/09349c2bcac228fe92ab05b4c4004881347697a3
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-11-26T12:37:44-08:00
Commit Message:
TOLTECS: Don't call c_str() on the return value of Common::String::format()
Changed paths:
engines/toltecs/menu.cpp
diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp
index 5ff0019..00a0372 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)));
More information about the Scummvm-git-logs
mailing list