From 96a6575e23b5baebcdd38269b80f47cc02a2627e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 21 Mar 2025 16:50:15 +0100 Subject: Refactor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/colour.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/colour.c') diff --git a/src/colour.c b/src/colour.c index 0138980..88acf64 100644 --- a/src/colour.c +++ b/src/colour.c @@ -1,4 +1,5 @@ -/* redshift-ng - Automatically adjust display colour temperature according the Sun +/*- + * redshift-ng - Automatically adjust display colour temperature according the Sun * * Copyright (c) 2009-2018 Jon Lund Steffensen * Copyright (c) 2014-2016, 2025 Mattias Andrée @@ -43,11 +44,6 @@ colour_setting_diff_is_major(const struct colour_setting *a, const struct colour } -#if defined(__GNUC__) -# pragma GCC diagnostic ignored "-Wfloat-equal" -#endif - - #define X(SUFFIX, TYPE, MAX, DEPTH)\ /** * Fill a gamma ramp @@ -65,7 +61,7 @@ colour_setting_diff_is_major(const struct colour_setting *a, const struct colour size_t i;\ double v;\ brightness /= (size - 1U);\ - if (gamma == 1.0) {\ + if (exact_eq(gamma, 1.0)) {\ brightness *= (MAX);\ for (i = 0; i < size; i++)\ ramp[i] = (TYPE)(i * brightness);\ -- cgit v1.2.3-70-g09d2