applied patch from Marco Munari that removes a redundant "if" (bug

2004-04-15  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimpcolorspace.c (gimp_rgb_to_hsv): applied patch
	from Marco Munari that removes a redundant "if" (bug #133540).
This commit is contained in:
Sven Neumann 2004-04-15 14:17:51 +00:00 committed by Sven Neumann
parent 850f43b3db
commit 70a9a84017
2 changed files with 7 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2004-04-15 Sven Neumann <sven@gimp.org>
* libgimpcolor/gimpcolorspace.c (gimp_rgb_to_hsv): applied patch
from Marco Munari that removes a redundant "if" (bug #133540).
2004-04-15 Sven Neumann <sven@gimp.org>
* plug-ins/ifscompose/ifscompose.c: applied patch from Yeti that

View File

@ -72,6 +72,8 @@ gimp_rgb_to_hsv (const GimpRGB *rgb,
if (rgb->r == max)
{
hsv->h = (rgb->g - rgb->b) / delta;
if (hsv->h < 0.0)
hsv->h += 6.0;
}
else if (rgb->g == max)
{
@ -83,11 +85,6 @@ gimp_rgb_to_hsv (const GimpRGB *rgb,
}
hsv->h /= 6.0;
if (hsv->h < 0.0)
hsv->h += 1.0;
else if (hsv->h > 1.0)
hsv->h -= 1.0;
}
else
{