diff options
author | Max Horn | 2009-12-30 23:01:16 +0000 |
---|---|---|
committer | Max Horn | 2009-12-30 23:01:16 +0000 |
commit | a753f606ec105a287b6eda5ffbfa2b4d6342bb84 (patch) | |
tree | 346cfa23e727fe4e3804d4786aa725359e980114 /engines | |
parent | d083e02215c9ef2309f436284c750c78005df6c7 (diff) | |
download | scummvm-rg350-a753f606ec105a287b6eda5ffbfa2b4d6342bb84.tar.gz scummvm-rg350-a753f606ec105a287b6eda5ffbfa2b4d6342bb84.tar.bz2 scummvm-rg350-a753f606ec105a287b6eda5ffbfa2b4d6342bb84.zip |
MOHAWK: Stop using String::emptyString
svn-id: r46780
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/console.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/file.cpp | 3 | ||||
-rw-r--r-- | engines/mohawk/livingbooks.cpp | 2 | ||||
-rw-r--r-- | engines/mohawk/myst.cpp | 2 | ||||
-rw-r--r-- | engines/mohawk/riven.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/riven_saveload.cpp | 2 |
6 files changed, 8 insertions, 9 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp index f2020a5144..8ff1d158da 100644 --- a/engines/mohawk/console.cpp +++ b/engines/mohawk/console.cpp @@ -498,7 +498,7 @@ bool RivenConsole::Cmd_DumpScript(int argc, const char **argv) { 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 @@ bool RivenConsole::Cmd_DumpScript(int argc, const char **argv) { 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); diff --git a/engines/mohawk/file.cpp b/engines/mohawk/file.cpp index feeffd042b..31d9188feb 100644 --- a/engines/mohawk/file.cpp +++ b/engines/mohawk/file.cpp @@ -31,7 +31,6 @@ namespace Mohawk { MohawkFile::MohawkFile() { _mhk = NULL; - _curFile = Common::String::emptyString; _types = NULL; _fileTable = NULL; } @@ -51,7 +50,7 @@ void MohawkFile::close() { delete[] _types; _types = NULL; delete[] _fileTable; _fileTable = NULL; - _curFile = Common::String::emptyString; + _curFile.clear(); } void MohawkFile::open(Common::SeekableReadStream *stream) { diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index 4d77b23ddf..56e555db6d 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -265,7 +265,7 @@ Common::SeekableSubReadStreamEndian *MohawkEngine_LivingBooks::wrapStreamEndian( } 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); } diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp index 1143db721e..1a4af35be1 100644 --- a/engines/mohawk/myst.cpp +++ b/engines/mohawk/myst.cpp @@ -714,7 +714,7 @@ void MohawkEngine_Myst::loadHelp(uint16 id) { uint16 count = helpStream->readUint16LE(); uint16 *u0 = new uint16[count]; - Common::String helpText = Common::String::emptyString; + Common::String helpText; debugC(kDebugHelp, "\tcount: %d", count); diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index 8653329fc9..bf98c64bdb 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -434,7 +434,7 @@ Common::String MohawkEngine_Riven::getHotspotName(uint16 hotspot) { 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::String MohawkEngine_Riven::getName(uint16 nameResource, uint16 nameID) { 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) { diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp index 9331d034cd..0045eb9b49 100644 --- a/engines/mohawk/riven_saveload.cpp +++ b/engines/mohawk/riven_saveload.cpp @@ -143,7 +143,7 @@ bool RivenSaveLoad::loadGame(Common::String filename) { 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) { |