From c3c1dc176f4b4dbf363eebf04a9b68be5e4cd599 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 19 Mar 2004 19:40:34 +0000 Subject: addMessageToStack doesn't have to return anything anymore svn-id: r13346 --- scumm/scumm.h | 2 +- scumm/string.cpp | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/scumm/scumm.h b/scumm/scumm.h index 7db438f49e..41de10a95e 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -1060,7 +1060,7 @@ protected: void CHARSET_1(); void drawString(int a, const byte *msg); - const byte *addMessageToStack(const byte *msg, byte *dstBuffer, int dstBufferSize); + void addMessageToStack(const byte *msg, byte *dstBuffer, int dstBufferSize); void addIntToStack(int var); void addVerbToStack(int var); void addNameToStack(int var); diff --git a/scumm/string.cpp b/scumm/string.cpp index 3dc4fd14e4..c1a061c742 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -466,7 +466,7 @@ void ScummEngine::drawString(int a, const byte *msg) { } } -const byte *ScummEngine::addMessageToStack(const byte *msg, byte *dstBuffer, int dstBufferSize) { +void ScummEngine::addMessageToStack(const byte *msg, byte *dstBuffer, int dstBufferSize) { uint num = 0; uint32 val; byte chr; @@ -478,7 +478,7 @@ const byte *ScummEngine::addMessageToStack(const byte *msg, byte *dstBuffer, int if (msg == NULL) { warning("Bad message in addMessageToStack, ignoring"); - return NULL; + return; } while ((buf[num++] = chr = *msg++) != 0) { @@ -566,8 +566,6 @@ const byte *ScummEngine::addMessageToStack(const byte *msg, byte *dstBuffer, int if (_msgPtrToAdd >= dstBuffer + dstBufferSize) error("addMessageToStack: buffer overflow!"); } - - return msg; } void ScummEngine::addIntToStack(int var) { -- cgit v1.2.3