mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 13:37:56 +00:00
Use the new SDL_clamp() macro where sensible
There were a few places throughout the SDL code where values were clamped using SDL_min() and SDL_max(). Now that we have an SDL_clamp() macro, use this instead.
This commit is contained in:
@@ -146,7 +146,7 @@ static int SDL_DoEventLogging = 0;
|
||||
static void SDLCALL
|
||||
SDL_EventLoggingChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
|
||||
{
|
||||
SDL_DoEventLogging = (hint && *hint) ? SDL_max(SDL_min(SDL_atoi(hint), 2), 0) : 0;
|
||||
SDL_DoEventLogging = (hint && *hint) ? SDL_clamp(SDL_atoi(hint), 0, 2) : 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user