[gimp] libgimpcolor: Remove conditions which are always true



commit 890b9abf940345245242c1cadf9cb0ef8a0208a3
Author: Mukund Sivaraman <muks banu com>
Date:   Sat Oct 1 13:13:49 2011 +0530

    libgimpcolor: Remove conditions which are always true

 libgimpcolor/gimpcolorspace.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgimpcolor/gimpcolorspace.c b/libgimpcolor/gimpcolorspace.c
index b601b53..1c69d7b 100644
--- a/libgimpcolor/gimpcolorspace.c
+++ b/libgimpcolor/gimpcolorspace.c
@@ -91,7 +91,7 @@ gimp_rgb_to_hsv (const GimpRGB *rgb,
         {
           hsv->h = 2.0 + (rgb->b - rgb->r) / delta;
         }
-      else if (rgb->b == max)
+      else
         {
           hsv->h = 4.0 + (rgb->r - rgb->g) / delta;
         }
@@ -233,7 +233,7 @@ gimp_rgb_to_hsl (const GimpRGB *rgb,
         {
           hsl->h = 2.0 + (rgb->b - rgb->r) / delta;
         }
-      else if (rgb->b == max)
+      else
         {
           hsl->h = 4.0 + (rgb->r - rgb->g) / delta;
         }
@@ -1005,7 +1005,7 @@ gimp_rgb_to_hsv4 (const guchar *rgb,
         h = (green - blue) / delta;
       else if (green == max)
         h = 2 + (blue - red) / delta;
-      else if (blue == max)
+      else
         h = 4 + (red - green) / delta;
 
       h /= 6.0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]