[Scummvm-cvs-logs] SF.net SVN: scummvm:[47357] tools/trunk
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Mon Jan 18 19:03:10 CET 2010
Revision: 47357
http://scummvm.svn.sourceforge.net/scummvm/?rev=47357&view=rev
Author: tdhs
Date: 2010-01-18 18:03:09 +0000 (Mon, 18 Jan 2010)
Log Message:
-----------
Removed emptyString usage from Mohawk tools.
Sync'd Common::String class with scummvm trunk.
Segfault still present.
Modified Paths:
--------------
tools/trunk/common/str.cpp
tools/trunk/common/str.h
tools/trunk/engines/mohawk/deriven.cpp
tools/trunk/engines/mohawk/mohawk_file.cpp
Modified: tools/trunk/common/str.cpp
===================================================================
--- tools/trunk/common/str.cpp 2010-01-18 16:12:47 UTC (rev 47356)
+++ tools/trunk/common/str.cpp 2010-01-18 18:03:09 UTC (rev 47357)
@@ -37,13 +37,6 @@
namespace Common {
-#if !(defined(PALMOS_ARM) || defined(PALMOS_DEBUG) || defined(__GP32__))
-const String String::emptyString;
-#else
-const char *String::emptyString = "";
-#endif
-
-
MemoryPool *g_refCountPool = 0; // FIXME: This is never freed right now
static uint32 computeCapacity(uint32 len) {
Modified: tools/trunk/common/str.h
===================================================================
--- tools/trunk/common/str.h 2010-01-18 16:12:47 UTC (rev 47356)
+++ tools/trunk/common/str.h 2010-01-18 18:03:09 UTC (rev 47357)
@@ -90,12 +90,6 @@
}
public:
-#if !(defined(PALMOS_ARM) || defined(PALMOS_DEBUG) || defined(__GP32__))
- static const String emptyString;
-#else
- static const char *emptyString;
-#endif
-
/** Construct a new empty string. */
String() : _size(0), _str(_storage) { _storage[0] = 0; }
Modified: tools/trunk/engines/mohawk/deriven.cpp
===================================================================
--- tools/trunk/engines/mohawk/deriven.cpp 2010-01-18 16:12:47 UTC (rev 47356)
+++ tools/trunk/engines/mohawk/deriven.cpp 2010-01-18 18:03:09 UTC (rev 47357)
@@ -109,7 +109,8 @@
for (uint32 i = 0; i < namesCount; i++) {
nameResource.stream->seek(curNamesPos + stringOffsets[i]);
- Common::String name = Common::String::emptyString;
+ Common::String name;
+ name.clear();
for (char c = nameResource.stream->readByte(); c; c = nameResource.stream->readByte())
name += c;
nameList.push_back(name);
Modified: tools/trunk/engines/mohawk/mohawk_file.cpp
===================================================================
--- tools/trunk/engines/mohawk/mohawk_file.cpp 2010-01-18 16:12:47 UTC (rev 47356)
+++ tools/trunk/engines/mohawk/mohawk_file.cpp 2010-01-18 18:03:09 UTC (rev 47357)
@@ -45,7 +45,7 @@
MohawkFile::MohawkFile() {
_mhk = NULL;
- _curFile = Common::String::emptyString;
+ _curFile.clear();
_types = NULL;
_fileTable = NULL;
_curExType = 0;
@@ -57,7 +57,7 @@
delete[] _types; _types = NULL;
delete[] _fileTable; _fileTable = NULL;
- _curFile = Common::String::emptyString;
+ _curFile.clear();
_curExType = 0;
_curExTypeIndex = 0;
}
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