From 3c9c4074b32b9d92f169c08a4b30090aa2b285da Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Sat, 23 Jan 2021 18:30:57 -0600 Subject: [PATCH] Prefer functions over macros. --- src/hsv_gradient.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hsv_gradient.cc b/src/hsv_gradient.cc index 83bd0fe2..1d42937a 100644 --- a/src/hsv_gradient.cc +++ b/src/hsv_gradient.cc @@ -65,8 +65,8 @@ long from_decimal_scale(long value, long max_value) { } void scaled_rgb_to_scaled_hsv(long *const rgb, long *hsv) { - long val = rgb[0] > rgb[1] ? MAX(rgb[0], rgb[2]) : MAX(rgb[1], rgb[2]); - long cmin = rgb[0] < rgb[1] ? MIN(rgb[0], rgb[2]) : MIN(rgb[1], rgb[2]); + long val = rgb[0] > rgb[1] ? std::max(rgb[0], rgb[2]) : std::max(rgb[1], rgb[2]); + long cmin = rgb[0] < rgb[1] ? std::min(rgb[0], rgb[2]) : std::min(rgb[1], rgb[2]); long delta = val - cmin; long hue;