[gimp/metadata-browser] libgimpcolor: Remove conditions which are always true
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] libgimpcolor: Remove conditions which are always true
- Date: Fri, 2 Dec 2011 01:59:36 +0000 (UTC)
commit 0251d5eb6542883b9f93b265b6a90b56403a93a4
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]