From d5ad6f6e6abf7845e3a99bde5d7fb0a9a599e559 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 10 Aug 2021 16:51:03 -0700 Subject: [PATCH] Clarified that you should never have side-effects in the parameters to SDL_min/SDL_max --- include/SDL_stdinc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h index f64219df3..373285458 100644 --- a/include/SDL_stdinc.h +++ b/include/SDL_stdinc.h @@ -430,8 +430,7 @@ extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, in extern DECLSPEC int SDLCALL SDL_abs(int x); -/* !!! FIXME: these have side effects. You probably shouldn't use them. */ -/* !!! FIXME: Maybe we do forceinline functions of SDL_mini, SDL_minf, etc? */ +/* NOTE: these double-evaluate their arguments, so you should never have side effects in the parameters */ #define SDL_min(x, y) (((x) < (y)) ? (x) : (y)) #define SDL_max(x, y) (((x) > (y)) ? (x) : (y))