From bd61e645ffea3fdc421f7dc17c0ac0c5fb0d2357 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 23 Dec 2022 16:59:12 -0700 Subject: [PATCH] [paint-extents] Use hb_min/hb_max --- src/hb-paint-extents.hh | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/hb-paint-extents.hh b/src/hb-paint-extents.hh index 84854f23b..bc9f05c22 100644 --- a/src/hb-paint-extents.hh +++ b/src/hb-paint-extents.hh @@ -30,14 +30,6 @@ #include "hb-draw.h" -#ifndef MIN -#define MIN(x,y) ((x) < (y) ? (x) : (y)) -#endif - -#ifndef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) -#endif - typedef struct hb_extents_t { float xmin, ymin, xmax, ymax; @@ -308,10 +300,10 @@ add_point (hb_extents_t *extents, } else { - extents->xmin = MIN (extents->xmin, x); - extents->ymin = MIN (extents->ymin, y); - extents->xmax = MAX (extents->xmax, x); - extents->ymax = MAX (extents->ymax, y); + extents->xmin = hb_min (extents->xmin, x); + extents->ymin = hb_min (extents->ymin, y); + extents->xmax = hb_max (extents->xmax, x); + extents->ymax = hb_max (extents->ymax, y); } }