Fixed Visual Studio warning 4245
This commit is contained in:
@@ -796,7 +796,7 @@ Uint8 SDL_FindColor(SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
|
||||
int i;
|
||||
Uint8 pixel = 0;
|
||||
|
||||
smallest = ~0;
|
||||
smallest = ~0U;
|
||||
for (i = 0; i < pal->ncolors; ++i) {
|
||||
rd = pal->colors[i].r - r;
|
||||
gd = pal->colors[i].g - g;
|
||||
|
||||
@@ -587,7 +587,7 @@ static BOOL WIN_ConvertUTF32toUTF8(UINT32 codepoint, char *text)
|
||||
|
||||
static BOOL WIN_ConvertUTF16toUTF8(UINT32 high_surrogate, UINT32 low_surrogate, char *text)
|
||||
{
|
||||
const UINT32 SURROGATE_OFFSET = 0x10000 - (0xD800 << 10) - 0xDC00;
|
||||
const UINT32 SURROGATE_OFFSET = 0x10000U - (0xD800 << 10) - 0xDC00;
|
||||
const UINT32 codepoint = (high_surrogate << 10) + low_surrogate + SURROGATE_OFFSET;
|
||||
return WIN_ConvertUTF32toUTF8(codepoint, text);
|
||||
}
|
||||
|
||||
@@ -684,7 +684,7 @@ SDL_SystemTheme WIN_GetSystemTheme(void)
|
||||
SDL_SystemTheme theme = SDL_SYSTEM_THEME_LIGHT;
|
||||
HKEY hKey;
|
||||
DWORD dwType = REG_DWORD;
|
||||
DWORD value = ~0;
|
||||
DWORD value = ~0U;
|
||||
DWORD length = sizeof(value);
|
||||
|
||||
/* Technically this isn't the system theme, but it's the preference for applications */
|
||||
|
||||
Reference in New Issue
Block a user