From f0b7627b7d88c1d5bb484961377114b210c8dd53 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 13 Jul 2014 12:20:19 +0300 Subject: Fix code style. --- src/resources/dyepalette.cpp | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'src/resources/dyepalette.cpp') 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) { -- cgit v1.2.3-70-g09d2