From c3434fa53d1c83bc65b640951364f842fe6c79f4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Oct 2012 00:27:51 +0300 Subject: Fix some signed/unsigned chars issues. --- src/resources/dye.cpp | 2 +- src/resources/dye.h | 2 +- src/resources/itemdb.cpp | 2 +- src/resources/iteminfo.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/resources') diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp index 4b5c1268c..62be4e09e 100644 --- a/src/resources/dye.cpp +++ b/src/resources/dye.cpp @@ -72,7 +72,7 @@ DyePalette::DyePalette(const std::string &description, const int8_t blockSize) logger->log("Error, invalid embedded palette: %s", description.c_str()); } -int DyePalette::hexDecode(const char c) +int DyePalette::hexDecode(const signed char c) { if ('0' <= c && c <= '9') return c - '0'; diff --git a/src/resources/dye.h b/src/resources/dye.h index d3960f04c..400010f37 100644 --- a/src/resources/dye.h +++ b/src/resources/dye.h @@ -80,7 +80,7 @@ class DyePalette final */ void replaceAOGLColor(uint8_t *const color) const; - static int hexDecode(const char c); + static int hexDecode(const signed char c); private: struct Color diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 559015be9..f2e07ce48 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -56,7 +56,7 @@ static void loadOrderSprite(ItemInfo *const itemInfo, const XmlNodePtr node, static int parseSpriteName(std::string name); static int parseDirectionName(std::string name); -static char const *const fields[][2] = +static const char *const fields[][2] = { { "attack", N_("Attack %+d") }, { "defense", N_("Defense %+d") }, diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index eb85e5c9e..c0fb962c7 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -206,7 +206,7 @@ const std::string ItemInfo::replaceColors(std::string str, str = replaceAll(str, "%color%", name); if (!name.empty()) - name[0] = static_cast(toupper(name[0])); + name[0] = static_cast(toupper(name[0])); return replaceAll(str, "%Color%", name); } -- cgit v1.2.3-60-g2f50