From 1b0c1b3f561576cbcd7c1494d3893200442dace4 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 19 Feb 2014 21:31:41 -0500 Subject: MADS: Fix GCC warnings --- engines/mads/font.cpp | 4 ++-- engines/mads/palette.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/engines/mads/font.cpp b/engines/mads/font.cpp index 9da46c30b1..e97cc95fdf 100644 --- a/engines/mads/font.cpp +++ b/engines/mads/font.cpp @@ -112,14 +112,14 @@ int Font::write(MSurface *surface, const Common::String &msg, const Common::Poin const char *text = msg.c_str(); while (*text) { char theChar = (*text++) & 0x7F; - int charWidth = _charWidths[theChar]; + int charWidth = _charWidths[(byte)theChar]; if (charWidth > 0) { if (xPos + charWidth >= width) return xPos; - uint8 *charData = &_charData[_charOffs[theChar]]; + uint8 *charData = &_charData[_charOffs[(byte)theChar]]; int bpp = getBpp(charWidth); if (skipY != 0) diff --git a/engines/mads/palette.h b/engines/mads/palette.h index a5d9c6ad1e..a97d5de20f 100644 --- a/engines/mads/palette.h +++ b/engines/mads/palette.h @@ -91,6 +91,11 @@ public: * Creates a new palette instance */ static Palette *init(MADSEngine *vm); + + /** + * Destructor + */ + virtual ~Palette() {} /** * Sets a new palette -- cgit v1.2.3