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 /gui | |
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 'gui')
-rw-r--r-- | gui/PopUpWidget.cpp | 2 | ||||
-rw-r--r-- | gui/launcher.cpp | 28 | ||||
-rw-r--r-- | gui/options.cpp | 10 |
3 files changed, 20 insertions, 20 deletions
diff --git a/gui/PopUpWidget.cpp b/gui/PopUpWidget.cpp index f12a4d5637..033b5ddaf6 100644 --- a/gui/PopUpWidget.cpp +++ b/gui/PopUpWidget.cpp @@ -352,7 +352,7 @@ void PopUpWidget::init() { _selectedItem = -1; - if (!_label.isEmpty() && _labelWidth == 0) + if (!_label.empty() && _labelWidth == 0) _labelWidth = g_gui.getStringWidth(_label); } diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 88ec899adf..0c3cfad17d 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -150,7 +150,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // GAME: Determine the description string String description(ConfMan.get("description", domain)); - if (description.isEmpty() && !desc.isEmpty()) { + if (description.empty() && !desc.empty()) { description = desc; } @@ -202,14 +202,14 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // GUI: Button + Label for the additional path new ButtonWidget(tab, "gameoptions_extrapath", "Extra Path:", kCmdExtraBrowser, 0); _extraPathWidget = new StaticTextWidget(tab, "gameoptions_extrapathText", extraPath); - if (extraPath.isEmpty() || !ConfMan.hasKey("extrapath", _domain)) { + if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) { _extraPathWidget->setLabel("None"); } // GUI: Button + Label for the save path new ButtonWidget(tab, "gameoptions_savepath", "Save Path: ", kCmdSaveBrowser, 0); _savePathWidget = new StaticTextWidget(tab, "gameoptions_savepathText", savePath); - if (savePath.isEmpty() || !ConfMan.hasKey("savepath", _domain)) { + if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) { _savePathWidget->setLabel("Default"); } @@ -318,15 +318,15 @@ void EditGameDialog::close() { ConfMan.set("language", Common::getLanguageCode(lang), _domain); String gamePath = _gamePathWidget->getLabel(); - if (!gamePath.isEmpty()) + if (!gamePath.empty()) ConfMan.set("path", gamePath, _domain); String extraPath = _extraPathWidget->getLabel(); - if (!extraPath.isEmpty() && (extraPath != "None")) + if (!extraPath.empty() && (extraPath != "None")) ConfMan.set("extrapath", extraPath, _domain); String savePath = _savePathWidget->getLabel(); - if (!savePath.isEmpty() && (savePath != "Default")) + if (!savePath.empty() && (savePath != "Default")) ConfMan.set("savepath", savePath, _domain); Common::Platform platform = (Common::Platform)_platformPopUp->getSelectedTag(); @@ -416,7 +416,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat // Write back changes made to config object String newDomain(_domainWidget->getEditString()); if (newDomain != _domain) { - if (newDomain.isEmpty() || ConfMan.hasGameDomain(newDomain)) { + if (newDomain.empty() || ConfMan.hasGameDomain(newDomain)) { MessageDialog alert("This game ID is already taken. Please choose another one."); alert.runModal(); return; @@ -495,7 +495,7 @@ LauncherDialog::LauncherDialog(GameDetector &detector) } void LauncherDialog::selectGame(const String &name) { - if (!name.isEmpty()) { + if (!name.empty()) { int itemToSelect = 0; StringList::const_iterator iter; for (iter = _domains.begin(); iter != _domains.end(); ++iter, ++itemToSelect) { @@ -534,15 +534,15 @@ void LauncherDialog::updateListing() { String gameid(iter->_value.get("gameid")); String description(iter->_value.get("description")); - if (gameid.isEmpty()) + if (gameid.empty()) gameid = iter->_key; - if (description.isEmpty()) { + if (description.empty()) { GameDescriptor g = GameDetector::findGame(gameid); - if (!g.description.isEmpty()) + if (!g.description.empty()) description = g.description; } - if (!gameid.isEmpty() && !description.isEmpty()) { + if (!gameid.empty() && !description.empty()) { // Insert the game into the launcher list int pos = 0, size = l.size(); @@ -582,7 +582,7 @@ void LauncherDialog::addGame() { DetectedGameList candidates(PluginManager::instance().detectGames(files)); int idx; - if (candidates.isEmpty()) { + if (candidates.empty()) { // No game was found in the specified directory MessageDialog alert("ScummVM could not find any game in the specified directory!"); alert.runModal(); @@ -675,7 +675,7 @@ void LauncherDialog::editGame(int item) { // music support etc. assert(item >= 0); String gameId(ConfMan.get("gameid", _domains[item])); - if (gameId.isEmpty()) + if (gameId.empty()) gameId = _domains[item]; EditGameDialog editDialog(_domains[item], GameDetector::findGame(gameId).description); if (editDialog.runModal() > 0) { diff --git a/gui/options.cpp b/gui/options.cpp index 504281e5f7..be99f0c8f6 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -514,7 +514,7 @@ void GlobalOptionsDialog::open() { Common::String extraPath(ConfMan.get("extrapath", _domain)); Common::String soundFont(ConfMan.get("soundfont", _domain)); - if (!dir.isEmpty()) { + if (!dir.empty()) { _savePath->setLabel(dir); } else { // Default to the current directory... @@ -523,13 +523,13 @@ void GlobalOptionsDialog::open() { _savePath->setLabel(buf); } - if (extraPath.isEmpty() || !ConfMan.hasKey("extrapath", _domain)) { + if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) { _extraPath->setLabel("None"); } else { _extraPath->setLabel(extraPath); } - if (soundFont.isEmpty() || !ConfMan.hasKey("soundfont", _domain)) { + if (soundFont.empty() || !ConfMan.hasKey("soundfont", _domain)) { _soundFont->setLabel("None"); } else { _soundFont->setLabel(soundFont); @@ -543,11 +543,11 @@ void GlobalOptionsDialog::close() { ConfMan.set("savepath", _savePath->getLabel(), _domain); String extraPath = _extraPath->getLabel(); - if (!extraPath.isEmpty() && (extraPath != "None")) + if (!extraPath.empty() && (extraPath != "None")) ConfMan.set("extrapath", extraPath, _domain); String soundFont = _soundFont->getLabel(); - if (!soundFont.isEmpty() && (soundFont != "None")) + if (!soundFont.empty() && (soundFont != "None")) ConfMan.set("soundfont", soundFont, _domain); } OptionsDialog::close(); |