summaryrefslogtreecommitdiff
path: root/src/resources/db/palettedb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-11 17:57:36 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-11 17:58:00 +0300
commit81c2837569e9e11cbce137464b8574b8868893d8 (patch)
treea34b4c3c7a0c8331653fb3c00c0f038643e3c2ae /src/resources/db/palettedb.cpp
parent5d4558bc21607cdb96a988e2867e466ff8b1578f (diff)
downloadmanaverse-81c2837569e9e11cbce137464b8574b8868893d8.tar.gz
manaverse-81c2837569e9e11cbce137464b8574b8868893d8.tar.bz2
manaverse-81c2837569e9e11cbce137464b8574b8868893d8.tar.xz
manaverse-81c2837569e9e11cbce137464b8574b8868893d8.zip
Fix compilation warning with some flags.
Diffstat (limited to 'src/resources/db/palettedb.cpp')
-rw-r--r--src/resources/db/palettedb.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp
index cc27fa292..88f90a1fc 100644
--- a/src/resources/db/palettedb.cpp
+++ b/src/resources/db/palettedb.cpp
@@ -82,23 +82,23 @@ void PaletteDB::loadPalette()
if (line.empty() || line[0] == '#')
continue;
-#ifdef WIN32
- unsigned int r;
- unsigned int g;
- unsigned int b;
+#ifdef ADVGCC
+ unsigned char r;
+ unsigned char g;
+ unsigned char b;
- if (sscanf(line.c_str(), "%10u %10u %10u\t%100s",
+ if (sscanf(line.c_str(), "%10hhu %10hhu %10hhu\t%100s",
&r, &g, &b, name) == 4)
{
name[100] = 0;
mColors[name] = DyeColor(r, g, b);
}
#else
- unsigned char r;
- unsigned char g;
- unsigned char b;
+ unsigned int r;
+ unsigned int g;
+ unsigned int b;
- if (sscanf(line.c_str(), "%10hhu %10hhu %10hhu\t%100s",
+ if (sscanf(line.c_str(), "%10u %10u %10u\t%100s",
&r, &g, &b, name) == 4)
{
name[100] = 0;