[Scummvm-cvs-logs] SF.net SVN: scummvm:[46780] scummvm/trunk/engines/mohawk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Thu Dec 31 00:01:16 CET 2009
Revision: 46780
http://scummvm.svn.sourceforge.net/scummvm/?rev=46780&view=rev
Author: fingolfin
Date: 2009-12-30 23:01:16 +0000 (Wed, 30 Dec 2009)
Log Message:
-----------
MOHAWK: Stop using String::emptyString
Modified Paths:
--------------
scummvm/trunk/engines/mohawk/console.cpp
scummvm/trunk/engines/mohawk/file.cpp
scummvm/trunk/engines/mohawk/livingbooks.cpp
scummvm/trunk/engines/mohawk/myst.cpp
scummvm/trunk/engines/mohawk/riven.cpp
scummvm/trunk/engines/mohawk/riven_saveload.cpp
Modified: scummvm/trunk/engines/mohawk/console.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/console.cpp 2009-12-30 23:00:55 UTC (rev 46779)
+++ scummvm/trunk/engines/mohawk/console.cpp 2009-12-30 23:01:16 UTC (rev 46780)
@@ -498,7 +498,7 @@
for (uint32 i = 0; i < namesCount; i++) {
nameStream->seek(curNamesPos + stringOffsets[i]);
- Common::String name = Common::String::emptyString;
+ Common::String name;
for (char c = nameStream->readByte(); c; c = nameStream->readByte())
name += c;
varNames.push_back(name);
@@ -519,7 +519,7 @@
for (uint32 i = 0; i < namesCount; i++) {
nameStream->seek(curNamesPos + stringOffsets[i]);
- Common::String name = Common::String::emptyString;
+ Common::String name;
for (char c = nameStream->readByte(); c; c = nameStream->readByte())
name += c;
xNames.push_back(name);
Modified: scummvm/trunk/engines/mohawk/file.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/file.cpp 2009-12-30 23:00:55 UTC (rev 46779)
+++ scummvm/trunk/engines/mohawk/file.cpp 2009-12-30 23:01:16 UTC (rev 46780)
@@ -31,7 +31,6 @@
MohawkFile::MohawkFile() {
_mhk = NULL;
- _curFile = Common::String::emptyString;
_types = NULL;
_fileTable = NULL;
}
@@ -51,7 +50,7 @@
delete[] _types; _types = NULL;
delete[] _fileTable; _fileTable = NULL;
- _curFile = Common::String::emptyString;
+ _curFile.clear();
}
void MohawkFile::open(Common::SeekableReadStream *stream) {
Modified: scummvm/trunk/engines/mohawk/livingbooks.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/livingbooks.cpp 2009-12-30 23:00:55 UTC (rev 46779)
+++ scummvm/trunk/engines/mohawk/livingbooks.cpp 2009-12-30 23:01:16 UTC (rev 46780)
@@ -265,7 +265,7 @@
}
Common::String MohawkEngine_LivingBooks::getStringFromConfig(Common::String section, Common::String key) {
- Common::String x = Common::String::emptyString;
+ Common::String x;
_bookInfoFile.getKey(key, section, x);
return removeQuotesFromString(x);
}
Modified: scummvm/trunk/engines/mohawk/myst.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/myst.cpp 2009-12-30 23:00:55 UTC (rev 46779)
+++ scummvm/trunk/engines/mohawk/myst.cpp 2009-12-30 23:01:16 UTC (rev 46780)
@@ -714,7 +714,7 @@
uint16 count = helpStream->readUint16LE();
uint16 *u0 = new uint16[count];
- Common::String helpText = Common::String::emptyString;
+ Common::String helpText;
debugC(kDebugHelp, "\tcount: %d", count);
Modified: scummvm/trunk/engines/mohawk/riven.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven.cpp 2009-12-30 23:00:55 UTC (rev 46779)
+++ scummvm/trunk/engines/mohawk/riven.cpp 2009-12-30 23:01:16 UTC (rev 46780)
@@ -434,7 +434,7 @@
assert(hotspot < _hotspotCount);
if (_hotspots[hotspot].name_resource < 0)
- return Common::String::emptyString;
+ return Common::String();
return getName(HotspotNames, _hotspots[hotspot].name_resource);
}
@@ -488,7 +488,7 @@
Common::SeekableReadStream* nameStream = getRawData(ID_NAME, nameResource);
uint16 fieldCount = nameStream->readUint16BE();
uint16* stringOffsets = new uint16[fieldCount];
- Common::String name = Common::String::emptyString;
+ Common::String name;
char c;
if (nameID < fieldCount) {
Modified: scummvm/trunk/engines/mohawk/riven_saveload.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven_saveload.cpp 2009-12-30 23:00:55 UTC (rev 46779)
+++ scummvm/trunk/engines/mohawk/riven_saveload.cpp 2009-12-30 23:01:16 UTC (rev 46780)
@@ -143,7 +143,7 @@
names->seek(curNamesPos);
names->seek(stringOffsets[i], SEEK_CUR);
- Common::String name = Common::String::emptyString;
+ Common::String name;
char c = (char)names->readByte();
while (c) {
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