[Scummvm-cvs-logs] SF.net SVN: scummvm: [21472] scummvm/trunk/gui

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Mar 28 01:44:10 CEST 2006


Revision: 21472
Author:   fingolfin
Date:     2006-03-28 01:42:54 -0800 (Tue, 28 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21472&view=rev

Log Message:
-----------
Renamed various container isEmpty() methods to empty() to match STL conventions

Modified Paths:
--------------
    scummvm/trunk/backends/wince/CELauncherDialog.cpp
    scummvm/trunk/base/gameDetector.cpp
    scummvm/trunk/base/main.cpp
    scummvm/trunk/common/array.h
    scummvm/trunk/common/assocarray.h
    scummvm/trunk/common/config-file.cpp
    scummvm/trunk/common/config-manager.cpp
    scummvm/trunk/common/list.h
    scummvm/trunk/common/map.h
    scummvm/trunk/common/stack.h
    scummvm/trunk/common/str.h
    scummvm/trunk/common/util.cpp
    scummvm/trunk/engines/gob/gob.cpp
    scummvm/trunk/engines/kyra/kyra.cpp
    scummvm/trunk/engines/lure/lure.cpp
    scummvm/trunk/engines/lure/res_struct.cpp
    scummvm/trunk/engines/lure/room.cpp
    scummvm/trunk/engines/queen/display.cpp
    scummvm/trunk/engines/saga/game.cpp
    scummvm/trunk/engines/saga/sthread.cpp
    scummvm/trunk/engines/scumm/dialogs.cpp
    scummvm/trunk/engines/scumm/resource.cpp
    scummvm/trunk/engines/simon/game.cpp
    scummvm/trunk/gui/PopUpWidget.cpp
    scummvm/trunk/gui/launcher.cpp
    scummvm/trunk/gui/options.cpp
    scummvm/trunk/sound/mididrv.cpp
    scummvm/trunk/test/common/array.h
    scummvm/trunk/test/common/list.h
    scummvm/trunk/test/common/map.h
    scummvm/trunk/test/common/str.h
Modified: scummvm/trunk/backends/wince/CELauncherDialog.cpp
===================================================================
--- scummvm/trunk/backends/wince/CELauncherDialog.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/backends/wince/CELauncherDialog.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -87,7 +87,7 @@
 	int idx = -1;
 	DetectedGame result;
 
-	if (candidates.isEmpty())
+	if (candidates.empty())
 		return;
 
 	if (candidates.size() == 1)

Modified: scummvm/trunk/base/gameDetector.cpp
===================================================================
--- scummvm/trunk/base/gameDetector.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/base/gameDetector.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -257,7 +257,7 @@
 		String name(iter->_key);
 		String description(iter->_value.get("description"));
 
-		if (description.isEmpty()) {
+		if (description.empty()) {
 			// FIXME: At this point, we should check for a "gameid" override
 			// to find the proper desc. In fact, the platform probably should
 			// be taken into account, too.
@@ -634,7 +634,7 @@
 }
 
 bool GameDetector::detectMain() {
-	if (_targetName.isEmpty()) {
+	if (_targetName.empty()) {
 		warning("No game was specified...");
 		return false;
 	}
@@ -656,7 +656,7 @@
 	printf("Trying to start game '%s'\n", game.description.c_str());
 
 	String gameDataPath(ConfMan.get("path"));
-	if (gameDataPath.isEmpty()) {
+	if (gameDataPath.empty()) {
 		warning("No path was provided. Assuming the data files are in the current directory");
 		gameDataPath = "./";
 	} else if (gameDataPath.lastChar() != '/'

Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/base/main.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -297,11 +297,11 @@
 	Common::String caption(ConfMan.get("description", detector._targetName));
 
 	Common::String desc = GameDetector::findGame(detector._gameid).description;
-	if (caption.isEmpty() && !desc.isEmpty())
+	if (caption.empty() && !desc.empty())
 		caption = desc;
-	if (caption.isEmpty())
+	if (caption.empty())
 		caption = detector._targetName;
-	if (!caption.isEmpty())	{
+	if (!caption.empty())	{
 		system.setWindowCaption(caption.c_str());
 	}
 
@@ -494,7 +494,7 @@
 	system.setWindowCaption(gScummVMFullVersion);
 
 	// Unless a game was specified, show the launcher dialog
-	if (detector._targetName.isEmpty())
+	if (detector._targetName.empty())
 		running = launcherDialog(detector, system);
 	else
 		// Setup a dummy palette, for the mouse cursor, in case an error

Modified: scummvm/trunk/common/array.h
===================================================================
--- scummvm/trunk/common/array.h	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/common/array.h	2006-03-28 09:42:54 UTC (rev 21472)
@@ -130,7 +130,7 @@
 		_capacity = 0;
 	}
 
-	bool isEmpty() const {
+	bool empty() const {
 		return (_size == 0);
 	}
 

Modified: scummvm/trunk/common/assocarray.h
===================================================================
--- scummvm/trunk/common/assocarray.h	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/common/assocarray.h	2006-03-28 09:42:54 UTC (rev 21472)
@@ -140,9 +140,16 @@
 	// even allow in-place modifications of
 	Key *new_all_keys(void) const;
 	Val *new_all_values(void) const;
+	//const_iterator	begin() const
+	//const_iterator	end() const
 	
-	
-	// TODO: There is no "remove(key)" method yet.
+	// TODO: There is no "remove" method yet.
+	//void remove(const Key &key);
+
+
+	bool empty() const {
+		return (_nele == 0);
+	}
 };
 
 //-------------------------------------------------------

Modified: scummvm/trunk/common/config-file.cpp
===================================================================
--- scummvm/trunk/common/config-file.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/common/config-file.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -122,7 +122,7 @@
 			*p = 0;
 
 			// Previous section is finished now, store it.
-			if (!section.name.isEmpty())
+			if (!section.name.empty())
 				_sections.push_back(section);
 
 			section.name = buf + 1;
@@ -140,7 +140,7 @@
 				continue;
 
 			// If no section has been set, this config file is invalid!
-			if (section.name.isEmpty()) {
+			if (section.name.empty()) {
 				error("Config file buggy: Key/value pair found outside a section in line %d", lineno);
 			}
 
@@ -162,7 +162,7 @@
 	}
 
 	// Save last section
-	if (!section.name.isEmpty())
+	if (!section.name.empty())
 		_sections.push_back(section);
 
 	return (!stream.ioFailed() || stream.eos());
@@ -179,7 +179,7 @@
 bool ConfigFile::saveToStream(WriteStream &stream) {
 	for (List<Section>::iterator i = _sections.begin(); i != _sections.end(); ++i) {
 		// Write out the section comment, if any
-		if (! i->comment.isEmpty()) {
+		if (! i->comment.empty()) {
 			stream.writeString(i->comment);
 		}
 
@@ -192,7 +192,7 @@
 		// Write out the key/value pairs
 		for (List<KeyValue>::iterator kv = i->keys.begin(); kv != i->keys.end(); ++kv) {
 			// Write out the comment, if any
-			if (! kv->comment.isEmpty()) {
+			if (! kv->comment.empty()) {
 				stream.writeString(kv->comment);
 			}
 			// Write out the key/value pair

Modified: scummvm/trunk/common/config-manager.cpp
===================================================================
--- scummvm/trunk/common/config-manager.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/common/config-manager.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -198,7 +198,7 @@
 					continue;
 
 				// If no domain has been set, this config file is invalid!
-				if (domain.isEmpty()) {
+				if (domain.empty()) {
 					error("Config file buggy: Key/value pair found outside a domain in line %d", lineno);
 				}
 
@@ -265,14 +265,14 @@
 }
 
 void ConfigManager::writeDomain(FILE *file, const String &name, const Domain &domain) {
-	if (domain.isEmpty())
+	if (domain.empty())
 		return;		// Don't bother writing empty domains.
 
 	String comment;
 
 	// Write domain comment (if any)
 	comment = domain.getDomainComment();
-	if (!comment.isEmpty())
+	if (!comment.empty())
 		fprintf(file, "%s", comment.c_str());
 
 	// Write domain start
@@ -282,7 +282,7 @@
 	Domain::const_iterator x;
 	for (x = domain.begin(); x != domain.end(); ++x) {
 		const String &value = x->_value;
-		if (!value.isEmpty()) {
+		if (!value.empty()) {
 			// Write comment (if any)
 			if (domain.hasKVComment(x->_key)) {
 				comment = domain.getKVComment(x->_key);
@@ -308,7 +308,7 @@
 	if (_transientDomain.contains(key))
 		return true;
 
-	if (!_activeDomain.isEmpty() && _gameDomains[_activeDomain].contains(key))
+	if (!_activeDomain.empty() && _gameDomains[_activeDomain].contains(key))
 		return true;
 
 	DomainMap::const_iterator iter;
@@ -321,7 +321,7 @@
 }
 
 bool ConfigManager::hasKey(const String &key, const String &dom) const {
-	assert(!dom.isEmpty());
+	assert(!dom.empty());
 	assert(isValidDomainName(dom));
 
 	if (dom == kTransientDomain)
@@ -335,7 +335,7 @@
 }
 
 void ConfigManager::removeKey(const String &key, const String &dom) {
-	assert(!dom.isEmpty());
+	assert(!dom.empty());
 	assert(isValidDomainName(dom));
 
 	if (dom == kTransientDomain)
@@ -361,12 +361,12 @@
 	// 3) All global domains
 	// 4) The defaults
 
-	if ((domain.isEmpty() || domain == kTransientDomain) && _transientDomain.contains(key))
+	if ((domain.empty() || domain == kTransientDomain) && _transientDomain.contains(key))
 		return _transientDomain[key];
 
-	const String &dom = domain.isEmpty() ? _activeDomain : domain;
+	const String &dom = domain.empty() ? _activeDomain : domain;
 
-	if (!dom.isEmpty() && _gameDomains.contains(dom) && _gameDomains[dom].contains(key))
+	if (!dom.empty() && _gameDomains.contains(dom) && _gameDomains[dom].contains(key))
 		return _gameDomains[dom][key];
 
 	DomainMap::const_iterator iter;
@@ -385,7 +385,7 @@
 	// For now, be tolerant against missing config keys. Strictly spoken, it is
 	// a bug in the calling code to retrieve an int for a key which isn't even
 	// present... and a default value of 0 seems rather arbitrary.
-	if (value.isEmpty())
+	if (value.empty())
 		return 0;
 
 	int ivalue = (int)strtol(value.c_str(), &errpos, 10);
@@ -412,11 +412,11 @@
 
 void ConfigManager::set(const String &key, const String &value, const String &dom) {
 	assert(isValidDomainName(dom));
-	if (dom.isEmpty()) {
+	if (dom.empty()) {
 		// Remove the transient domain value
 		_transientDomain.remove(key);
 
-		if (_activeDomain.isEmpty())
+		if (_activeDomain.empty())
 			_globalDomains[kApplicationDomain][key] = value;
 		else
 			_gameDomains[_activeDomain][key] = value;
@@ -428,7 +428,7 @@
 		else {
 			if (_globalDomains.contains(dom)) {
 				_globalDomains[dom][key] = value;
-				if (_activeDomain.isEmpty() || !_gameDomains[_activeDomain].contains(key))
+				if (_activeDomain.empty() || !_gameDomains[_activeDomain].contains(key))
 					_transientDomain.remove(key);
 			} else {
 				_gameDomains[dom][key] = value;
@@ -480,14 +480,14 @@
 
 
 void ConfigManager::setActiveDomain(const String &domain) {
-	assert(!domain.isEmpty());
+	assert(!domain.empty());
 	assert(isValidDomainName(domain));
 	_activeDomain = domain;
 	_gameDomains.addKey(domain);
 }
 
 void ConfigManager::removeGameDomain(const String &domain) {
-	assert(!domain.isEmpty());
+	assert(!domain.empty());
 	assert(isValidDomainName(domain));
 	_gameDomains.remove(domain);
 }
@@ -496,8 +496,8 @@
 	if (oldName == newName)
 		return;
 
-	assert(!oldName.isEmpty());
-	assert(!newName.isEmpty());
+	assert(!oldName.empty());
+	assert(!newName.empty());
 	assert(isValidDomainName(oldName));
 	assert(isValidDomainName(newName));
 
@@ -507,7 +507,7 @@
 }
 
 bool ConfigManager::hasGameDomain(const String &domain) const {
-	assert(!domain.isEmpty());
+	assert(!domain.empty());
 	return isValidDomainName(domain) && _gameDomains.contains(domain);
 }
 

Modified: scummvm/trunk/common/list.h
===================================================================
--- scummvm/trunk/common/list.h	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/common/list.h	2006-03-28 09:42:54 UTC (rev 21472)
@@ -230,7 +230,7 @@
 		erase(begin(), end());
 	}
 	
-	bool isEmpty() const { 
+	bool empty() const { 
 		return (_anchor == _anchor->_next);
 	}
 

Modified: scummvm/trunk/common/map.h
===================================================================
--- scummvm/trunk/common/map.h	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/common/map.h	2006-03-28 09:42:54 UTC (rev 21472)
@@ -150,7 +150,7 @@
 		_root = 0;
 	}
 
-	bool isEmpty() const {
+	bool empty() const {
 		return (_root == 0);
 	}
 

Modified: scummvm/trunk/common/stack.h
===================================================================
--- scummvm/trunk/common/stack.h	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/common/stack.h	2006-03-28 09:42:54 UTC (rev 21472)
@@ -83,7 +83,7 @@
 	Stack<T>() {}
 
 	bool empty() const {
-		return _stack.isEmpty();
+		return _stack.empty();
 	}
 	void clear() {
 		_stack.clear();

Modified: scummvm/trunk/common/str.h
===================================================================
--- scummvm/trunk/common/str.h	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/common/str.h	2006-03-28 09:42:54 UTC (rev 21472)
@@ -71,7 +71,7 @@
 	const char *c_str() const		{ return _str ? _str : ""; }
 	uint size() const				{ return _len; }
 
-	bool isEmpty() const	{ return (_len == 0); }
+	bool empty() const	{ return (_len == 0); }
 	char lastChar() const	{ return (_len > 0) ? _str[_len-1] : 0; }
 
 	char operator [](int idx) const {

Modified: scummvm/trunk/common/util.cpp
===================================================================
--- scummvm/trunk/common/util.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/common/util.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -131,7 +131,7 @@
 };
 
 Language parseLanguage(const String &str) {
-	if (str.isEmpty())
+	if (str.empty())
 		return UNK_LANG;
 
 	const char *s = str.c_str();
@@ -189,7 +189,7 @@
 };
 
 Platform parsePlatform(const String &str) {
-	if (str.isEmpty())
+	if (str.empty())
 		return kPlatformUnknown;
 
 	const char *s = str.c_str();
@@ -245,7 +245,7 @@
 };
 
 RenderMode parseRenderMode(const String &str) {
-	if (str.isEmpty())
+	if (str.empty())
 		return kRenderDefault;
 
 	const char *s = str.c_str();

Modified: scummvm/trunk/engines/gob/gob.cpp
===================================================================
--- scummvm/trunk/engines/gob/gob.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/engines/gob/gob.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -325,7 +325,7 @@
 				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;

Modified: scummvm/trunk/engines/kyra/kyra.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/engines/kyra/kyra.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -188,7 +188,7 @@
 				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;

Modified: scummvm/trunk/engines/lure/lure.cpp
===================================================================
--- scummvm/trunk/engines/lure/lure.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/engines/lure/lure.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -137,7 +137,7 @@
 				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;

Modified: scummvm/trunk/engines/lure/res_struct.cpp
===================================================================
--- scummvm/trunk/engines/lure/res_struct.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/engines/lure/res_struct.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -189,7 +189,7 @@
 
 bool MovementDataList::getFrame(uint16 currentFrame, int16 &xChange, 
 							   int16 &yChange, uint16 &nextFrame) {
-	if (isEmpty()) return false;
+	if (empty()) return false;
 	bool foundFlag = false;
 	iterator i;
 

Modified: scummvm/trunk/engines/lure/room.cpp
===================================================================
--- scummvm/trunk/engines/lure/room.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/engines/lure/room.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -206,7 +206,7 @@
 	Resources &res = Resources::getReference();
 
 	RoomExitHotspotList &exits = _roomData->exitHotspots;
-	if (exits.isEmpty()) return CURSOR_ARROW;
+	if (exits.empty()) return CURSOR_ARROW;
 	RoomExitJoinData *join;
 	bool skipFlag;
 

Modified: scummvm/trunk/engines/queen/display.cpp
===================================================================
--- scummvm/trunk/engines/queen/display.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/engines/queen/display.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -836,7 +836,7 @@
 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);
 		}
 	}

Modified: scummvm/trunk/engines/saga/game.cpp
===================================================================
--- scummvm/trunk/engines/saga/game.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/engines/saga/game.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -1599,7 +1599,7 @@
 		}
 	}
 
-	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");
 

Modified: scummvm/trunk/engines/saga/sthread.cpp
===================================================================
--- scummvm/trunk/engines/saga/sthread.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/engines/saga/sthread.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -190,7 +190,7 @@
 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);
 }
 

Modified: scummvm/trunk/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/engines/scumm/dialogs.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -303,7 +303,7 @@
 	case GUI::kListItemActivatedCmd:
 	case GUI::kListItemDoubleClickedCmd:
 		if (selItem >= 0) {
-			if (_saveMode || !getResultString().isEmpty()) {
+			if (_saveMode || !getResultString().empty()) {
 				setResult(selItem);
 				close();
 			}
@@ -316,7 +316,7 @@
 		// 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 @@
 	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 @@
 		// 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 @@
 	_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;

Modified: scummvm/trunk/engines/scumm/resource.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/engines/scumm/resource.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -286,7 +286,7 @@
 bool ScummEngine::openFile(BaseScummFile &file, const char *filename, bool resourceFile) {
 	bool result = false;
 
-	if (!_containerFile.isEmpty()) {
+	if (!_containerFile.empty()) {
 		char name[128];
 
 		file.close();

Modified: scummvm/trunk/engines/simon/game.cpp
===================================================================
--- scummvm/trunk/engines/simon/game.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/engines/simon/game.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -1450,7 +1450,7 @@
 		}
 	}
 
-	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");
 

Modified: scummvm/trunk/gui/PopUpWidget.cpp
===================================================================
--- scummvm/trunk/gui/PopUpWidget.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/gui/PopUpWidget.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -352,7 +352,7 @@
 
 	_selectedItem = -1;
 
-	if (!_label.isEmpty() && _labelWidth == 0)
+	if (!_label.empty() && _labelWidth == 0)
 		_labelWidth = g_gui.getStringWidth(_label);
 }
 

Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/gui/launcher.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -150,7 +150,7 @@
 
 	// 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 @@
 	// 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 @@
 			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 @@
 		// 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 @@
 }
 
 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 @@
 		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 @@
 		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 @@
 	// 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) {

Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/gui/options.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -514,7 +514,7 @@
 	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 @@
 		_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 @@
 		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();

Modified: scummvm/trunk/sound/mididrv.cpp
===================================================================
--- scummvm/trunk/sound/mididrv.cpp	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/sound/mididrv.cpp	2006-03-28 09:42:54 UTC (rev 21472)
@@ -112,7 +112,7 @@
 }
 
 const MidiDriverDescription &MidiDriver::findMusicDriver(const Common::String &str) {
-	if (str.isEmpty())
+	if (str.empty())
 		return s_musicDrivers[0];
 
 	const char *s = str.c_str();

Modified: scummvm/trunk/test/common/array.h
===================================================================
--- scummvm/trunk/test/common/array.h	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/test/common/array.h	2006-03-28 09:42:54 UTC (rev 21472)
@@ -6,15 +6,15 @@
 class ArrayTestSuite : public CxxTest::TestSuite
 {
 	public:
-	void test_isEmpty_clear( void )
+	void test_empty_clear( void )
 	{
 		Common::Array<int> array;
-		TS_ASSERT( array.isEmpty() );
+		TS_ASSERT( array.empty() );
 		array.push_back(17);
 		array.push_back(33);
-		TS_ASSERT( !array.isEmpty() );
+		TS_ASSERT( !array.empty() );
 		array.clear();
-		TS_ASSERT( array.isEmpty() );
+		TS_ASSERT( array.empty() );
 	}
 
 	void test_iterator( void )

Modified: scummvm/trunk/test/common/list.h
===================================================================
--- scummvm/trunk/test/common/list.h	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/test/common/list.h	2006-03-28 09:42:54 UTC (rev 21472)
@@ -6,15 +6,15 @@
 class ListTestSuite : public CxxTest::TestSuite
 {
 	public:
-	void test_isEmpty_clear( void )
+	void test_empty_clear( void )
 	{
 		Common::List<int> list;
-		TS_ASSERT( list.isEmpty() );
+		TS_ASSERT( list.empty() );
 		list.push_back(17);
 		list.push_back(33);
-		TS_ASSERT( !list.isEmpty() );
+		TS_ASSERT( !list.empty() );
 		list.clear();
-		TS_ASSERT( list.isEmpty() );
+		TS_ASSERT( list.empty() );
 	}
 
 	void test_iterator( void )

Modified: scummvm/trunk/test/common/map.h
===================================================================
--- scummvm/trunk/test/common/map.h	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/test/common/map.h	2006-03-28 09:42:54 UTC (rev 21472)
@@ -6,15 +6,15 @@
 class MapTestSuite : public CxxTest::TestSuite
 {
 	public:
-	void test_isEmpty_clear( void )
+	void test_empty_clear( void )
 	{
 		Common::Map<int, int> map;
-		TS_ASSERT( map.isEmpty() );
+		TS_ASSERT( map.empty() );
 		map[0] = 17;
 		map[1] = 33;
-		TS_ASSERT( !map.isEmpty() );
+		TS_ASSERT( !map.empty() );
 		map.clear();
-		TS_ASSERT( map.isEmpty() );
+		TS_ASSERT( map.empty() );
 	}
 	void test_contains( void )
 	{

Modified: scummvm/trunk/test/common/str.h
===================================================================
--- scummvm/trunk/test/common/str.h	2006-03-28 09:37:50 UTC (rev 21471)
+++ scummvm/trunk/test/common/str.h	2006-03-28 09:42:54 UTC (rev 21472)
@@ -6,12 +6,12 @@
 class StringTestSuite : public CxxTest::TestSuite
 {
 	public:
-	void test_isEmpty_clear( void )
+	void test_empty_clear( void )
 	{
 		Common::String str("test");
-		TS_ASSERT( !str.isEmpty() );
+		TS_ASSERT( !str.empty() );
 		str.clear();
-		TS_ASSERT( str.isEmpty() );
+		TS_ASSERT( str.empty() );
 	}
 
 	void test_lastChar( void )


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list