diff options
author | Willem Jan Palenstijn | 2015-12-23 21:51:39 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:51:39 +0100 |
commit | 10d9d8dee5104736da53a2807f3367b13731ad8f (patch) | |
tree | b00efc0a0e65dff64e4460c2f0290cb1910906dc | |
parent | ff93e55afd6467d7a53c836db931de786f8f7d63 (diff) | |
download | scummvm-rg350-10d9d8dee5104736da53a2807f3367b13731ad8f.tar.gz scummvm-rg350-10d9d8dee5104736da53a2807f3367b13731ad8f.tar.bz2 scummvm-rg350-10d9d8dee5104736da53a2807f3367b13731ad8f.zip |
LAB: Fix warnings by adding consts
-rw-r--r-- | engines/lab/lab.h | 4 | ||||
-rw-r--r-- | engines/lab/special.cpp | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/lab/lab.h b/engines/lab/lab.h index ba642f5ddb..200dd000cb 100644 --- a/engines/lab/lab.h +++ b/engines/lab/lab.h @@ -312,7 +312,7 @@ private: /** * Draws the text for the monitor. */ - void drawMonText(char *text, TextFont *monitorFont, Common::Rect textRect, bool isinteractive); + void drawMonText(const char *text, TextFont *monitorFont, Common::Rect textRect, bool isinteractive); /** * Draws a room map. @@ -430,7 +430,7 @@ private: /** * Processes user input. */ - void processMonitor(char *ntext, TextFont *monitorFont, bool isInteractive, Common::Rect textRect); + void processMonitor(const char *ntext, TextFont *monitorFont, bool isInteractive, Common::Rect textRect); /** * Figures out what a room's coordinates should be. diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 649c725102..7dd42dcf9b 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -293,10 +293,10 @@ void LabEngine::doJournal() { _graphics->blackScreen(); } -void LabEngine::drawMonText(char *text, TextFont *monitorFont, Common::Rect textRect, bool isinteractive) { +void LabEngine::drawMonText(const char *text, TextFont *monitorFont, Common::Rect textRect, bool isinteractive) { uint16 drawingToPage = 0, yspacing = 0; int charsDrawn = 0; - char *curText = text; + const char *curText = text; _event->mouseHide(); @@ -347,7 +347,7 @@ void LabEngine::drawMonText(char *text, TextFont *monitorFont, Common::Rect text _event->mouseShow(); } -void LabEngine::processMonitor(char *ntext, TextFont *monitorFont, bool isInteractive, Common::Rect textRect) { +void LabEngine::processMonitor(const char *ntext, TextFont *monitorFont, bool isInteractive, Common::Rect textRect) { Common::String startFileName = _monitorTextFilename; CloseDataPtr startClosePtr = _closeDataPtr, lastClosePtr[10]; uint16 depth = 0; @@ -371,7 +371,7 @@ void LabEngine::processMonitor(char *ntext, TextFont *monitorFont, bool isIntera Common::String text = _resource->getText(_monitorTextFilename); _graphics->fade(false, 0); - drawMonText((char *)text.c_str(), monitorFont, textRect, isInteractive); + drawMonText(text.c_str(), monitorFont, textRect, isInteractive); _graphics->fade(true, 0); } } @@ -461,10 +461,10 @@ void LabEngine::doMonitor(const Common::String background, const Common::String Common::String ntext = _resource->getText(textfile); _graphics->loadBackPict(background, _highPalette); - drawMonText((char *)ntext.c_str(), monitorFont, scaledRect, isinteractive); + drawMonText(ntext.c_str(), monitorFont, scaledRect, isinteractive); _event->mouseShow(); _graphics->fade(true, 0); - processMonitor((char *)ntext.c_str(), monitorFont, isinteractive, scaledRect); + processMonitor(ntext.c_str(), monitorFont, isinteractive, scaledRect); _graphics->fade(false, 0); _event->mouseHide(); _graphics->closeFont(&monitorFont); |