Skip to content

Commit

Permalink
use 'U' suffix on constants instead of (unsigned int) cast.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Aug 30, 2019
1 parent d52080c commit 9c8e403
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/android/SDL_android.c
Expand Up @@ -2400,7 +2400,7 @@ int Android_JNI_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *bu
if (messageboxdata->colorScheme) {
colors = (*env)->NewIntArray(env, SDL_MESSAGEBOX_COLOR_MAX);
for (i = 0; i < SDL_MESSAGEBOX_COLOR_MAX; ++i) {
temp = ((unsigned int)0xFF << 24) |
temp = (0xFFU << 24) |
(messageboxdata->colorScheme->colors[i].r << 16) |
(messageboxdata->colorScheme->colors[i].g << 8) |
(messageboxdata->colorScheme->colors[i].b << 0);
Expand Down
2 changes: 1 addition & 1 deletion src/joystick/controller_type.h
Expand Up @@ -61,7 +61,7 @@ typedef enum
k_eControllertype_GenericMouse = 800,
} EControllerType;

#define MAKE_CONTROLLER_ID( nVID, nPID ) (unsigned int)( (unsigned int)nVID << 16 | nPID )
#define MAKE_CONTROLLER_ID( nVID, nPID ) (unsigned int)( (unsigned int)nVID << 16 | (unsigned int)nPID )
typedef struct
{
unsigned int m_unDeviceID;
Expand Down
4 changes: 2 additions & 2 deletions src/video/SDL_RLEaccel.c
Expand Up @@ -295,10 +295,10 @@
} while(0)

#define ALPHA_BLIT16_565_50(to, from, length, bpp, alpha) \
ALPHA_BLIT16_50(to, from, length, bpp, alpha, (unsigned int)0xf7de)
ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xf7deU)

#define ALPHA_BLIT16_555_50(to, from, length, bpp, alpha) \
ALPHA_BLIT16_50(to, from, length, bpp, alpha, (unsigned int)0xfbde)
ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xfbdeU)

#define CHOOSE_BLIT(blitter, alpha, fmt) \
do { \
Expand Down

0 comments on commit 9c8e403

Please sign in to comment.