diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-17 23:26:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-17 23:26:59 +0300 |
commit | 7e0a97d2521b9ce57003176e82a0b5564aa003c2 (patch) | |
tree | 5b2cfe1afe09bea1063f783050c1fb549daee76d /src/resources/dye.cpp | |
parent | f68cbf700a99f2f184715a5b8025bcb4b6525391 (diff) | |
download | manaplus-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.gz manaplus-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.bz2 manaplus-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.xz manaplus-7e0a97d2521b9ce57003176e82a0b5564aa003c2.zip |
Fix more code style and additional warnings.
Diffstat (limited to 'src/resources/dye.cpp')
-rw-r--r-- | src/resources/dye.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp index 316dff9f3..df26ec1b7 100644 --- a/src/resources/dye.cpp +++ b/src/resources/dye.cpp @@ -54,8 +54,9 @@ DyePalette::DyePalette(const std::string &description, int8_t blockSize) for (int i = 0, colorIdx = 0; i < blockSize && colorIdx < dyePalateSize; i +=2, colorIdx ++) { - color.value[colorIdx] = (hexDecode(description[pos + i]) << 4) - + hexDecode(description[pos + i + 1]); + color.value[colorIdx] = static_cast<unsigned char>(( + hexDecode(description[pos + i]) << 4) + + hexDecode(description[pos + i + 1])); } mColors.push_back(color); pos += blockSize; |