From 5de6f22175d504607803c5ff53e703a5913942ab Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 4 Aug 2020 00:57:31 -0700 Subject: [PATCH] Use SDL_max/min instead of std::max/min in Graphics::Hitest() In an effort to reduce STL usage, this should be done. --- desktop_version/src/Graphics.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index e2bf45d3..ffe4bb17 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1402,10 +1402,10 @@ bool Graphics::Hitest(SDL_Surface* surface1, point p1, SDL_Surface* surface2, po if(intersection) { - int r3_left = std::max(r1_left, r2_left); - int r3_top = std::min(r1_top, r2_top); - int r3_right = std::min(r1_right, r2_right); - int r3_bottom= std::max(r1_bottom, r2_bottom); + int r3_left = SDL_max(r1_left, r2_left); + int r3_top = SDL_min(r1_top, r2_top); + int r3_right = SDL_min(r1_right, r2_right); + int r3_bottom= SDL_max(r1_bottom, r2_bottom); //for every pixel inside rectangle for(int x = r3_left; x < r3_right; x++)