summaryrefslogtreecommitdiff
path: root/src/resources/db
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-23 04:04:00 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-23 04:04:00 +0300
commit45a17142524b79254b0b87a8385ee36cbfac79ce (patch)
tree04865c94ae41a9740dc4a52f693cbd830f4c125d /src/resources/db
parent7e8f6e26d5e2d1c560092cf72bc4f7f98f7fba07 (diff)
downloadmanaplus-45a17142524b79254b0b87a8385ee36cbfac79ce.tar.gz
manaplus-45a17142524b79254b0b87a8385ee36cbfac79ce.tar.bz2
manaplus-45a17142524b79254b0b87a8385ee36cbfac79ce.tar.xz
manaplus-45a17142524b79254b0b87a8385ee36cbfac79ce.zip
Fix code style.
Diffstat (limited to 'src/resources/db')
-rw-r--r--src/resources/db/palettedb.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp
index 88f90a1fc..4a233d67b 100644
--- a/src/resources/db/palettedb.cpp
+++ b/src/resources/db/palettedb.cpp
@@ -82,18 +82,6 @@ void PaletteDB::loadPalette()
if (line.empty() || line[0] == '#')
continue;
-#ifdef ADVGCC
- unsigned char r;
- unsigned char g;
- unsigned char b;
-
- 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 int r;
unsigned int g;
unsigned int b;
@@ -102,9 +90,10 @@ void PaletteDB::loadPalette()
&r, &g, &b, name) == 4)
{
name[100] = 0;
- mColors[name] = DyeColor(r, g, b);
+ mColors[name] = DyeColor(CAST_U8(r),
+ CAST_U8(g),
+ CAST_U8(b));
}
-#endif
}
}