diff options
author | D G Turner | 2017-09-08 02:56:22 +0100 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 02:15:32 +0000 |
commit | ea955675db26106dfc22aaf5a9721c056437ddfc (patch) | |
tree | cca10ea0e965f3dcc3a309eec5dd43858a49d920 /engines | |
parent | e6fea1bd86831f51603c3610649e1691e52f98b9 (diff) | |
download | scummvm-rg350-ea955675db26106dfc22aaf5a9721c056437ddfc.tar.gz scummvm-rg350-ea955675db26106dfc22aaf5a9721c056437ddfc.tar.bz2 scummvm-rg350-ea955675db26106dfc22aaf5a9721c056437ddfc.zip |
SUPERNOVA: Fix GCC Warning for Malformed Narrowing Conversions in C++11.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/supernova/supernova.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp index e421d6f1b4..73ce543618 100644 --- a/engines/supernova/supernova.cpp +++ b/engines/supernova/supernova.cpp @@ -400,7 +400,9 @@ void SupernovaEngine::renderRoom(Room &room) { } int SupernovaEngine::textWidth(const uint16 key) { - const char text[2] = {key & 0xFF, 0}; + char text[2]; + text[0] = key & 0xFF; + text[1] = 0; return textWidth(text); } @@ -545,7 +547,9 @@ void SupernovaEngine::renderText(const char *text, int x, int y, byte color) { } void SupernovaEngine::renderText(const uint16 character, int x, int y, byte color) { - char text[2] = {character & 0xFF, 0}; + char text[2]; + text[0] = character & 0xFF; + text[1] = 0; renderText(text, x, y, color); } @@ -554,7 +558,9 @@ void SupernovaEngine::renderText(const char *text) { } void SupernovaEngine::renderText(const uint16 character) { - char text[2] = {character & 0xFF, 0}; + char text[2]; + text[0] = character & 0xFF; + text[1] = 0; renderText(text, _textCursorX, _textCursorY, _textColor); } |