diff --git a/src/render/software/SDL_rotate.c b/src/render/software/SDL_rotate.c index 6a9efac9c..d5ffc147a 100644 --- a/src/render/software/SDL_rotate.c +++ b/src/render/software/SDL_rotate.c @@ -61,11 +61,6 @@ typedef struct tColorY { Uint8 y; } tColorY; -/* ! -\brief Returns maximum of two numbers a and b. -*/ -#define MAX(a,b) (((a) > (b)) ? (a) : (b)) - /* ! \brief Number of guard rows added to destination surfaces. diff --git a/src/render/software/SDL_rotate.h b/src/render/software/SDL_rotate.h index 171baa5dd..8d7ec9d28 100644 --- a/src/render/software/SDL_rotate.h +++ b/src/render/software/SDL_rotate.h @@ -22,10 +22,6 @@ #ifndef SDL_rotate_h_ #define SDL_rotate_h_ -#ifndef MIN -#define MIN(a,b) (((a) < (b)) ? (a) : (b)) -#endif - extern SDL_Surface *SDLgfx_rotateSurface(SDL_Surface * src, double angle, int smooth, int flipx, int flipy, const SDL_Rect *rect_dest, double cangle, double sangle, const SDL_FPoint *center); extern void SDLgfx_rotozoomSurfaceSizeTrig(int width, int height, double angle, const SDL_FPoint *center, diff --git a/src/video/SDL_RLEaccel.c b/src/video/SDL_RLEaccel.c index 983c9d914..e8b05ec9b 100644 --- a/src/video/SDL_RLEaccel.c +++ b/src/video/SDL_RLEaccel.c @@ -92,10 +92,6 @@ #include "SDL_blit.h" #include "SDL_RLEaccel_c.h" -#ifndef MIN -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#endif - #define PIXEL_COPY(to, from, len, bpp) \ SDL_memcpy(to, from, (size_t)(len) * (bpp)) @@ -1161,13 +1157,13 @@ RLEAlphaSurface(SDL_Surface * surface) ADD_OPAQUE_COUNTS(max_opaque_run, 0); skip -= max_opaque_run; } - len = MIN(run, max_opaque_run); + len = SDL_min(run, max_opaque_run); ADD_OPAQUE_COUNTS(skip, len); dst += copy_opaque(dst, src + runstart, len, sf, df); runstart += len; run -= len; while (run) { - len = MIN(run, max_opaque_run); + len = SDL_min(run, max_opaque_run); ADD_OPAQUE_COUNTS(0, len); dst += copy_opaque(dst, src + runstart, len, sf, df); runstart += len; @@ -1195,13 +1191,13 @@ RLEAlphaSurface(SDL_Surface * surface) ADD_TRANSL_COUNTS(max_transl_run, 0); skip -= max_transl_run; } - len = MIN(run, max_transl_run); + len = SDL_min(run, max_transl_run); ADD_TRANSL_COUNTS(skip, len); dst += copy_transl(dst, src + runstart, len, sf, df); runstart += len; run -= len; while (run) { - len = MIN(run, max_transl_run); + len = SDL_min(run, max_transl_run); ADD_TRANSL_COUNTS(0, len); dst += copy_transl(dst, src + runstart, len, sf, df); runstart += len; @@ -1359,14 +1355,14 @@ RLEColorkeySurface(SDL_Surface * surface) ADD_COUNTS(maxn, 0); skip -= maxn; } - len = MIN(run, maxn); + len = SDL_min(run, maxn); ADD_COUNTS(skip, len); SDL_memcpy(dst, srcbuf + runstart * bpp, len * bpp); dst += len * bpp; run -= len; runstart += len; while (run) { - len = MIN(run, maxn); + len = SDL_min(run, maxn); ADD_COUNTS(0, len); SDL_memcpy(dst, srcbuf + runstart * bpp, len * bpp); dst += len * bpp; diff --git a/src/video/uikit/SDL_uikitopenglview.m b/src/video/uikit/SDL_uikitopenglview.m index 52158f8d7..ef5ca74e5 100644 --- a/src/video/uikit/SDL_uikitopenglview.m +++ b/src/video/uikit/SDL_uikitopenglview.m @@ -89,7 +89,7 @@ glGetIntegerv(GL_MAX_SAMPLES, &maxsamples); /* Clamp the samples to the max supported count. */ - samples = MIN(samples, maxsamples); + samples = SDL_min(samples, maxsamples); } if (sRGB) {