From e663fbaeba760003b4088e567af0883534891e59 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 28 Jan 2024 02:53:56 +0100 Subject: Revert "Reduce scope of variables" This reverts commit 96c7ebc6dc9e8b8327db04a9570054ee78743353. --- mate-panel/libpanel-util/panel-color.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'mate-panel/libpanel-util/panel-color.c') diff --git a/mate-panel/libpanel-util/panel-color.c b/mate-panel/libpanel-util/panel-color.c index 661e6fb5..f6148aaa 100644 --- a/mate-panel/libpanel-util/panel-color.c +++ b/mate-panel/libpanel-util/panel-color.c @@ -17,6 +17,7 @@ rgb_to_hls (gdouble *r, gdouble *g, gdouble *b) gdouble green; gdouble blue; gdouble h, l, s; + gdouble delta; red = *r; green = *g; @@ -49,8 +50,6 @@ rgb_to_hls (gdouble *r, gdouble *g, gdouble *b) h = 0; if (max != min) { - gdouble delta; - if (l <= 0.5) s = (max - min) / (max + min); else @@ -85,9 +84,11 @@ rgb_to_hls (gdouble *r, gdouble *g, gdouble *b) static void hls_to_rgb (gdouble *h, gdouble *l, gdouble *s) { + gdouble hue; gdouble lightness; gdouble saturation; gdouble m1, m2; + gdouble r, g, b; lightness = *l; saturation = *s; @@ -103,9 +104,6 @@ hls_to_rgb (gdouble *h, gdouble *l, gdouble *s) *l = lightness; *s = lightness; } else { - gdouble hue; - gdouble r, g, b; - hue = *h + 120; while (hue > 360) hue -= 360; -- cgit v1.2.1