diff options
author | Tobia Tesan | 2016-03-06 12:00:05 +0100 |
---|---|---|
committer | Tobia Tesan | 2016-03-06 12:00:05 +0100 |
commit | 9222038a162ebd483f7791006672f2effb0206de (patch) | |
tree | f6696aef6bb8231a6ccb2e20308a7a38291c8cb0 /engines | |
parent | 97dc2a22c4cb9f40956966d682cf9ce0b985960b (diff) | |
download | scummvm-rg350-9222038a162ebd483f7791006672f2effb0206de.tar.gz scummvm-rg350-9222038a162ebd483f7791006672f2effb0206de.tar.bz2 scummvm-rg350-9222038a162ebd483f7791006672f2effb0206de.zip |
WINTERMUTE: Use Common::String in arg for initSave
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wintermute/base/base_persistence_manager.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/base/base_persistence_manager.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp index 0a0ba91e5d..39462f7a15 100644 --- a/engines/wintermute/base/base_persistence_manager.cpp +++ b/engines/wintermute/base/base_persistence_manager.cpp @@ -215,8 +215,8 @@ bool BasePersistenceManager::getSaveExists(int slot) { } ////////////////////////////////////////////////////////////////////////// -bool BasePersistenceManager::initSave(const char *desc) { - if (!desc) { +bool BasePersistenceManager::initSave(const Common::String &desc) { + if (desc == "") { return STATUS_FAILED; } @@ -297,11 +297,11 @@ bool BasePersistenceManager::initSave(const char *desc) { uint32 dataOffset = _offset + sizeof(uint32) + // data offset - sizeof(uint32) + strlen(desc) + 1 + // description + sizeof(uint32) + strlen(desc.c_str()) + 1 + // description sizeof(uint32); // timestamp putDWORD(dataOffset); - putString(desc); + putString(desc.c_str()); g_system->getTimeAndDate(_savedTimestamp); putTimeDate(_savedTimestamp); diff --git a/engines/wintermute/base/base_persistence_manager.h b/engines/wintermute/base/base_persistence_manager.h index 9187976931..760b45c907 100644 --- a/engines/wintermute/base/base_persistence_manager.h +++ b/engines/wintermute/base/base_persistence_manager.h @@ -63,7 +63,7 @@ public: uint32 getMaxUsedSlot(); bool getSaveExists(int slot); bool initLoad(const Common::String &filename); - bool initSave(const char *desc); + bool initSave(const Common::String &desc); bool getBytes(byte *buffer, uint32 size); bool putBytes(byte *buffer, uint32 size); uint32 _offset; |