diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-13 12:20:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-13 12:20:19 +0300 |
commit | f0b7627b7d88c1d5bb484961377114b210c8dd53 (patch) | |
tree | a978c3b8eca88759fa71b5fc34112f4bea9bbcec /src/resources/dyepalette.cpp | |
parent | d9be27bba8941260500066cdd43ebb016356bc67 (diff) | |
download | manaplus-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.gz manaplus-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.bz2 manaplus-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.xz manaplus-f0b7627b7d88c1d5bb484961377114b210c8dd53.zip |
Fix code style.
Diffstat (limited to 'src/resources/dyepalette.cpp')
-rw-r--r-- | src/resources/dyepalette.cpp | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/resources/dyepalette.cpp b/src/resources/dyepalette.cpp index f20af9086..4c62abd1c 100644 --- a/src/resources/dyepalette.cpp +++ b/src/resources/dyepalette.cpp @@ -234,11 +234,11 @@ void DyePalette::replaceSColor(uint32_t *restrict pixels, const DyeColor &col2 = *it; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const unsigned int coldata = (col.value[2] << 16) - | (col.value[1] << 8) | (col.value[0]); + const unsigned int coldata = (col.value[2] << 16U) + | (col.value[1] << 8U) | (col.value[0]); #else - const unsigned int coldata = (col.value[2] << 8) - | (col.value[1] << 16) | (col.value[0] << 24); + const unsigned int coldata = (col.value[2] << 8U) + | (col.value[1] << 16U) | (col.value[0] << 24U); #endif // logger->log("coldata: %08x", coldata); if (data == coldata) @@ -280,11 +280,15 @@ void DyePalette::replaceAColor(uint32_t *restrict pixels, const DyeColor &col2 = *it; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const unsigned int coldata = (col.value[3] << 24) - | (col.value[2] << 16) | (col.value[1] << 8) | (col.value[0]); + const unsigned int coldata = (col.value[3] << 24U) + | (col.value[2] << 16U) + | (col.value[1] << 8U) + | (col.value[0]); #else - const unsigned int coldata = (col.value[3]) | (col.value[2] << 8) - | (col.value[1] << 16) | (col.value[0] << 24); + const unsigned int coldata = (col.value[3]) + | (col.value[2] << 8U) + | (col.value[1] << 16U) | + (col.value[0] << 24U); #endif if (data == coldata) @@ -378,11 +382,15 @@ void DyePalette::replaceAOGLColor(uint32_t *restrict pixels, const DyeColor &col2 = *it; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - const unsigned int coldata = (col.value[0] << 24) - | (col.value[1] << 16) | (col.value[2] << 8) | col.value[3]; + const unsigned int coldata = (col.value[0] << 24U) + | (col.value[1] << 16U) + | (col.value[2] << 8U) + | col.value[3]; #else - const unsigned int coldata = (col.value[0]) | (col.value[1] << 8) - | (col.value[2] << 16) | (col.value[3] << 24); + const unsigned int coldata = (col.value[0]) + | (col.value[1] << 8U) + | (col.value[2] << 16U) + | (col.value[3] << 24U); #endif if (data == coldata) { |