diff options
author | Max Horn | 2006-03-28 09:42:54 +0000 |
---|---|---|
committer | Max Horn | 2006-03-28 09:42:54 +0000 |
commit | 9f93e5bb81a54a98eb7957209662f152e2962679 (patch) | |
tree | ffd439f7aa7347bd7ba806c2131be458a7112ef1 /engines | |
parent | 950c3451a2dbadffa6437e98a20eb3a4163216e2 (diff) | |
download | scummvm-rg350-9f93e5bb81a54a98eb7957209662f152e2962679.tar.gz scummvm-rg350-9f93e5bb81a54a98eb7957209662f152e2962679.tar.bz2 scummvm-rg350-9f93e5bb81a54a98eb7957209662f152e2962679.zip |
Renamed various container isEmpty() methods to empty() to match STL conventions
svn-id: r21472
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/gob.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/kyra.cpp | 2 | ||||
-rw-r--r-- | engines/lure/lure.cpp | 2 | ||||
-rw-r--r-- | engines/lure/res_struct.cpp | 2 | ||||
-rw-r--r-- | engines/lure/room.cpp | 2 | ||||
-rw-r--r-- | engines/queen/display.cpp | 2 | ||||
-rw-r--r-- | engines/saga/game.cpp | 2 | ||||
-rw-r--r-- | engines/saga/sthread.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/dialogs.cpp | 12 | ||||
-rw-r--r-- | engines/scumm/resource.cpp | 2 | ||||
-rw-r--r-- | engines/simon/game.cpp | 2 |
11 files changed, 16 insertions, 16 deletions
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 2dbee4cd1f..67b54dc693 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -325,7 +325,7 @@ DetectedGameList Engine_GOB_detectGames(const FSList &fslist) { detectedGames.push_back(DetectedGame(g->gameid, g->description)); } } - if (detectedGames.isEmpty()) { + if (detectedGames.empty()) { printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str); const PlainGameDescriptor *g1 = gob_list; diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp index 051260f77c..ac534c010f 100644 --- a/engines/kyra/kyra.cpp +++ b/engines/kyra/kyra.cpp @@ -188,7 +188,7 @@ DetectedGameList Engine_KYRA_detectGames(const FSList &fslist) { detectedGames.push_back(dg); } } - if (detectedGames.isEmpty()) { + if (detectedGames.empty()) { printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str); const PlainGameDescriptor *g1 = kyra_list; diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp index a034fec156..25a9a1a5c2 100644 --- a/engines/lure/lure.cpp +++ b/engines/lure/lure.cpp @@ -137,7 +137,7 @@ DetectedGameList Engine_LURE_detectGames(const FSList &fslist) { detectedGames.push_back(dg); } } - if (detectedGames.isEmpty()) { + if (detectedGames.empty()) { debug("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str); const PlainGameDescriptor *g1 = lure_list; diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp index a099f51f07..4858f5e06b 100644 --- a/engines/lure/res_struct.cpp +++ b/engines/lure/res_struct.cpp @@ -189,7 +189,7 @@ MovementData::MovementData(MovementResource *rec) { bool MovementDataList::getFrame(uint16 currentFrame, int16 &xChange, int16 &yChange, uint16 &nextFrame) { - if (isEmpty()) return false; + if (empty()) return false; bool foundFlag = false; iterator i; diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp index 6346181cc0..3db3986ef1 100644 --- a/engines/lure/room.cpp +++ b/engines/lure/room.cpp @@ -206,7 +206,7 @@ uint8 Room::checkRoomExits() { Resources &res = Resources::getReference(); RoomExitHotspotList &exits = _roomData->exitHotspots; - if (exits.isEmpty()) return CURSOR_ARROW; + if (exits.empty()) return CURSOR_ARROW; RoomExitJoinData *join; bool skipFlag; diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp index dc5c82aa4d..7c9573612a 100644 --- a/engines/queen/display.cpp +++ b/engines/queen/display.cpp @@ -836,7 +836,7 @@ void Display::setTextCentered(uint16 y, const char *text, bool outlined) { void Display::drawTexts() { for (int y = GAME_SCREEN_HEIGHT - 1; y > 0; --y) { const TextSlot *pts = &_texts[y]; - if (!pts->text.isEmpty()) { + if (!pts->text.empty()) { drawText(pts->x, y, pts->color, pts->text.c_str(), pts->outlined); } } diff --git a/engines/saga/game.cpp b/engines/saga/game.cpp index 3ecff99410..b05dea094a 100644 --- a/engines/saga/game.cpp +++ b/engines/saga/game.cpp @@ -1599,7 +1599,7 @@ static int detectGame(const FSList *fslist, Common::Language language, Common::P } } - if (!filesMD5.isEmpty() && (matchedCount == 0)) { + if (!filesMD5.empty() && (matchedCount == 0)) { printf("MD5s of your game version are unknown. Please, report following data to\n"); printf("ScummVM team along with your game name and version:\n"); diff --git a/engines/saga/sthread.cpp b/engines/saga/sthread.cpp index 0a1a260cef..a186a61a8b 100644 --- a/engines/saga/sthread.cpp +++ b/engines/saga/sthread.cpp @@ -190,7 +190,7 @@ void Script::abortAllThreads(void) { void Script::completeThread(void) { int limit = (_vm->getGameType() == GType_IHNM) ? 100 : 40; - for (int i = 0; i < limit && !_threadList.isEmpty(); i++) + for (int i = 0; i < limit && !_threadList.empty(); i++) executeThreads(0); } diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index d29b56fa9e..d1d23c2902 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -303,7 +303,7 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da case GUI::kListItemActivatedCmd: case GUI::kListItemDoubleClickedCmd: if (selItem >= 0) { - if (_saveMode || !getResultString().isEmpty()) { + if (_saveMode || !getResultString().empty()) { setResult(selItem); close(); } @@ -316,7 +316,7 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da // Disable button if nothing is selected, or (in load mode) if an empty // list item is selected. We allow choosing an empty item in save mode // because we then just assign a default name. - _chooseButton->setEnabled(selItem >= 0 && (_saveMode || !getResultString().isEmpty())); + _chooseButton->setEnabled(selItem >= 0 && (_saveMode || !getResultString().empty())); _chooseButton->draw(); break; default: @@ -434,7 +434,7 @@ void SaveLoadChooserEx::handleCommand(CommandSender *sender, uint32 cmd, uint32 case GUI::kListItemActivatedCmd: case GUI::kListItemDoubleClickedCmd: if (selItem >= 0) { - if (_saveMode || !getResultString().isEmpty()) { + if (_saveMode || !getResultString().empty()) { _list->endEditMode(); setResult(selItem); close(); @@ -498,7 +498,7 @@ void SaveLoadChooserEx::handleCommand(CommandSender *sender, uint32 cmd, uint32 // Disable button if nothing is selected, or (in load mode) if an empty // list item is selected. We allow choosing an empty item in save mode // because we then just assign a default name. - _chooseButton->setEnabled(selItem >= 0 && (_saveMode || !getResultString().isEmpty())); + _chooseButton->setEnabled(selItem >= 0 && (_saveMode || !getResultString().empty())); _chooseButton->draw(); } break; case kCloseCmd: @@ -608,10 +608,10 @@ void MainMenuDialog::save() { _saveDialog->setList(generateSavegameList(_vm, true)); idx = _saveDialog->runModal(); if (idx >= 0) { - const String &result = _saveDialog->getResultString(); + String result(_saveDialog->getResultString()); char buffer[20]; const char *str; - if (result.isEmpty()) { + if (result.empty()) { // If the user was lazy and entered no save name, come up with a default name. sprintf(buffer, "Save %d", idx + 1); str = buffer; diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp index 897459c8be..4dce417216 100644 --- a/engines/scumm/resource.cpp +++ b/engines/scumm/resource.cpp @@ -286,7 +286,7 @@ void ScummEngine::readRoomsOffsets() { bool ScummEngine::openFile(BaseScummFile &file, const char *filename, bool resourceFile) { bool result = false; - if (!_containerFile.isEmpty()) { + if (!_containerFile.empty()) { char name[128]; file.close(); diff --git a/engines/simon/game.cpp b/engines/simon/game.cpp index da2e0a9e52..907ee978f7 100644 --- a/engines/simon/game.cpp +++ b/engines/simon/game.cpp @@ -1450,7 +1450,7 @@ int detectGame(const FSList &fslist, bool mode, int start) { } } - if (!filesMD5.isEmpty() && start == -1) { + if (!filesMD5.empty() && start == -1) { printf("MD5s of your game version are unknown. Please, report following data to\n"); printf("ScummVM team along with your game name and version:\n"); |