summaryrefslogtreecommitdiff
path: root/src/resources/dyepalette.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-13 12:20:19 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-13 12:20:19 +0300
commitf0b7627b7d88c1d5bb484961377114b210c8dd53 (patch)
treea978c3b8eca88759fa71b5fc34112f4bea9bbcec /src/resources/dyepalette.cpp
parentd9be27bba8941260500066cdd43ebb016356bc67 (diff)
downloadmv-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.gz
mv-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.bz2
mv-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.xz
mv-f0b7627b7d88c1d5bb484961377114b210c8dd53.zip
Fix code style.
Diffstat (limited to 'src/resources/dyepalette.cpp')
-rw-r--r--src/resources/dyepalette.cpp32
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)
{