diff options
author | Eugene Sandulenko | 2009-05-06 09:12:24 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2009-05-06 09:12:24 +0000 |
commit | af4d23f76260658b1b5e0e9ae40f00f6245bfa4f (patch) | |
tree | d4b2df07582c05f25711c48eb81f2c978c6db310 /engines/sword2 | |
parent | 4da318bd11886be2ce07fe3b813c8259be94b0f4 (diff) | |
download | scummvm-rg350-af4d23f76260658b1b5e0e9ae40f00f6245bfa4f.tar.gz scummvm-rg350-af4d23f76260658b1b5e0e9ae40f00f6245bfa4f.tar.bz2 scummvm-rg350-af4d23f76260658b1b5e0e9ae40f00f6245bfa4f.zip |
Const correctness
svn-id: r40346
Diffstat (limited to 'engines/sword2')
-rw-r--r-- | engines/sword2/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/sword2/sword2.cpp | 2 | ||||
-rw-r--r-- | engines/sword2/sword2.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/engines/sword2/saveload.cpp b/engines/sword2/saveload.cpp index e9d184f9d6..4a8b0e9ab6 100644 --- a/engines/sword2/saveload.cpp +++ b/engines/sword2/saveload.cpp @@ -70,14 +70,14 @@ uint32 Sword2Engine::findBufferSize() { * Save the game. */ -uint32 Sword2Engine::saveGame(uint16 slotNo, byte *desc) { +uint32 Sword2Engine::saveGame(uint16 slotNo, const byte *desc) { char description[SAVE_DESCRIPTION_LEN]; uint32 bufferSize = findBufferSize(); byte *saveBuffer = (byte *)malloc(bufferSize); ScreenInfo *screenInfo = _screen->getScreenInfo(); memset(description, 0, sizeof(description)); - strncpy(description, (char *)desc, SAVE_DESCRIPTION_LEN - 1); + strncpy(description, (const char *)desc, SAVE_DESCRIPTION_LEN - 1); Common::MemoryWriteStream writeS(saveBuffer, bufferSize); diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index e9ad1dba4a..54c646c326 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -832,7 +832,7 @@ uint32 Sword2Engine::getMillis() { } Common::Error Sword2Engine::saveGameState(int slot, const char *desc) { - uint32 saveVal = saveGame(slot, (byte *)desc); + uint32 saveVal = saveGame(slot, (const byte *)desc); if (saveVal == SR_OK) return Common::kNoError; diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h index 7168e7ae47..84530fc4f2 100644 --- a/engines/sword2/sword2.h +++ b/engines/sword2/sword2.h @@ -219,7 +219,7 @@ public: bool checkTextLine(byte *file, uint32 text_line); byte *fetchPaletteMatchTable(byte *screenFile); - uint32 saveGame(uint16 slotNo, byte *description); + uint32 saveGame(uint16 slotNo, const byte *description); uint32 restoreGame(uint16 slotNo); uint32 getSaveDescription(uint16 slotNo, byte *description); bool saveExists(); |