summaryrefslogtreecommitdiff
path: root/src/resources/safeopenglimagehelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/safeopenglimagehelper.cpp')
-rw-r--r--src/resources/safeopenglimagehelper.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/resources/safeopenglimagehelper.cpp b/src/resources/safeopenglimagehelper.cpp
index 70b2c31a1..e80f4de9c 100644
--- a/src/resources/safeopenglimagehelper.cpp
+++ b/src/resources/safeopenglimagehelper.cpp
@@ -162,16 +162,16 @@ SDL_Surface *SafeOpenGLImageHelper::convertSurfaceNormalize(SDL_Surface
// Determine 32-bit masks based on byte order
uint32_t rmask, gmask, bmask, amask;
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
- rmask = 0xff000000;
- gmask = 0x00ff0000;
- bmask = 0x0000ff00;
- amask = 0x000000ff;
+ rmask = 0xff000000U;
+ gmask = 0x00ff0000U;
+ bmask = 0x0000ff00U;
+ amask = 0x000000ffU;
#else // SDL_BYTEORDER == SDL_BIG_ENDIAN
- rmask = 0x000000ff;
- gmask = 0x0000ff00;
- bmask = 0x00ff0000;
- amask = 0xff000000;
+ rmask = 0x000000ffU;
+ gmask = 0x0000ff00U;
+ bmask = 0x00ff0000U;
+ amask = 0xff000000U;
#endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
if (tmpImage->format->BitsPerPixel != 32
@@ -216,16 +216,16 @@ SDL_Surface *SafeOpenGLImageHelper::convertSurface(SDL_Surface *tmpImage,
// Determine 32-bit masks based on byte order
uint32_t rmask, gmask, bmask, amask;
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
- rmask = 0xff000000;
- gmask = 0x00ff0000;
- bmask = 0x0000ff00;
- amask = 0x000000ff;
+ rmask = 0xff000000U;
+ gmask = 0x00ff0000U;
+ bmask = 0x0000ff00U;
+ amask = 0x000000ffU;
#else // SDL_BYTEORDER == SDL_BIG_ENDIAN
- rmask = 0x000000ff;
- gmask = 0x0000ff00;
- bmask = 0x00ff0000;
- amask = 0xff000000;
+ rmask = 0x000000ffU;
+ gmask = 0x0000ff00U;
+ bmask = 0x00ff0000U;
+ amask = 0xff000000U;
#endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
if (tmpImage->format->BitsPerPixel != 32
@@ -417,16 +417,16 @@ SDL_Surface *SafeOpenGLImageHelper::create32BitSurface(int width,
int height) const
{
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
- const int rmask = 0xff000000;
- const int gmask = 0x00ff0000;
- const int bmask = 0x0000ff00;
- const int amask = 0x000000ff;
+ const uint32_t rmask = 0xff000000U;
+ const uint32_t gmask = 0x00ff0000U;
+ const uint32_t bmask = 0x0000ff00U;
+ const uint32_t amask = 0x000000ffU;
#else // SDL_BYTEORDER == SDL_BIG_ENDIAN
- const int rmask = 0x000000ff;
- const int gmask = 0x0000ff00;
- const int bmask = 0x00ff0000;
- const int amask = 0xff000000;
+ const uint32_t rmask = 0x000000ffU;
+ const uint32_t gmask = 0x0000ff00U;
+ const uint32_t bmask = 0x00ff0000U;
+ const uint32_t amask = 0xff000000U;
#endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
width = powerOfTwo(width);