gimp r24738 - in trunk: . app/gegl



Author: mitch
Date: Mon Jan 28 20:42:48 2008
New Revision: 24738
URL: http://svn.gnome.org/viewvc/gimp?rev=24738&view=rev

Log:
2008-01-28  Michael Natterer  <mitch gimp org>

	* app/gegl/gimpoperationcolorbalance.c
	* app/gegl/gimpoperationcolorize.c
	* app/gegl/gimpoperationcurves.c
	* app/gegl/gimpoperationdesaturate.c
	* app/gegl/gimpoperationhuesaturation.c
	* app/gegl/gimpoperationlevels.c
	* app/gegl/gimpoperationposterize.c
	* app/gegl/gimpoperationthreshold.c: replace for() loops over the
	samples by while() loop counting down the passed "samples"
	parameter.



Modified:
   trunk/ChangeLog
   trunk/app/gegl/gimpoperationcolorbalance.c
   trunk/app/gegl/gimpoperationcolorize.c
   trunk/app/gegl/gimpoperationcurves.c
   trunk/app/gegl/gimpoperationdesaturate.c
   trunk/app/gegl/gimpoperationhuesaturation.c
   trunk/app/gegl/gimpoperationlevels.c
   trunk/app/gegl/gimpoperationposterize.c
   trunk/app/gegl/gimpoperationthreshold.c

Modified: trunk/app/gegl/gimpoperationcolorbalance.c
==============================================================================
--- trunk/app/gegl/gimpoperationcolorbalance.c	(original)
+++ trunk/app/gegl/gimpoperationcolorbalance.c	Mon Jan 28 20:42:48 2008
@@ -119,12 +119,11 @@
   GimpColorBalanceConfig   *config = GIMP_COLOR_BALANCE_CONFIG (point->config);
   gfloat                   *src    = in_buf;
   gfloat                   *dest   = out_buf;
-  glong                     sample;
 
   if (! config)
     return FALSE;
 
-  for (sample = 0; sample < samples; sample++)
+  while (samples--)
     {
       gfloat r = src[RED_PIX];
       gfloat g = src[GREEN_PIX];

Modified: trunk/app/gegl/gimpoperationcolorize.c
==============================================================================
--- trunk/app/gegl/gimpoperationcolorize.c	(original)
+++ trunk/app/gegl/gimpoperationcolorize.c	Mon Jan 28 20:42:48 2008
@@ -83,7 +83,6 @@
   gfloat                   *src    = in_buf;
   gfloat                   *dest   = out_buf;
   GimpHSL                   hsl;
-  glong                     sample;
 
   if (! config)
     return FALSE;
@@ -91,7 +90,7 @@
   hsl.h = config->hue;
   hsl.s = config->saturation;
 
-  for (sample = 0; sample < samples; sample++)
+  while (samples--)
     {
       GimpRGB rgb;
       gfloat  lum = GIMP_RGB_LUMINANCE (src[RED_PIX],

Modified: trunk/app/gegl/gimpoperationcurves.c
==============================================================================
--- trunk/app/gegl/gimpoperationcurves.c	(original)
+++ trunk/app/gegl/gimpoperationcurves.c	Mon Jan 28 20:42:48 2008
@@ -107,12 +107,11 @@
   GimpCurvesConfig         *config = GIMP_CURVES_CONFIG (point->config);
   gfloat                   *src    = in_buf;
   gfloat                   *dest   = out_buf;
-  glong                     sample;
 
   if (! config)
     return FALSE;
 
-  for (sample = 0; sample < samples; sample++)
+  while (samples--)
     {
       gint channel;
 

Modified: trunk/app/gegl/gimpoperationdesaturate.c
==============================================================================
--- trunk/app/gegl/gimpoperationdesaturate.c	(original)
+++ trunk/app/gegl/gimpoperationdesaturate.c	Mon Jan 28 20:42:48 2008
@@ -137,9 +137,8 @@
   GimpOperationDesaturate *self = GIMP_OPERATION_DESATURATE (operation);
   gfloat                  *src  = in_buf;
   gfloat                  *dest = out_buf;
-  glong                    sample;
 
-  for (sample = 0; sample < samples; sample++)
+  while (samples--)
     {
       gfloat value = 0.0;
 

Modified: trunk/app/gegl/gimpoperationhuesaturation.c
==============================================================================
--- trunk/app/gegl/gimpoperationhuesaturation.c	(original)
+++ trunk/app/gegl/gimpoperationhuesaturation.c	Mon Jan 28 20:42:48 2008
@@ -132,12 +132,11 @@
   gfloat                   *src     = in_buf;
   gfloat                   *dest    = out_buf;
   gfloat                    overlap = config->overlap / 2.0;
-  glong                     sample;
 
   if (! config)
     return FALSE;
 
-  for (sample = 0; sample < samples; sample++)
+  while (samples--)
     {
       GimpRGB  rgb;
       GimpHSL  hsl;

Modified: trunk/app/gegl/gimpoperationlevels.c
==============================================================================
--- trunk/app/gegl/gimpoperationlevels.c	(original)
+++ trunk/app/gegl/gimpoperationlevels.c	Mon Jan 28 20:42:48 2008
@@ -114,12 +114,11 @@
   GimpLevelsConfig         *config = GIMP_LEVELS_CONFIG (point->config);
   gfloat                   *src    = in_buf;
   gfloat                   *dest   = out_buf;
-  glong                     sample;
 
   if (! config)
     return FALSE;
 
-  for (sample = 0; sample < samples; sample++)
+  while (samples--)
     {
       gint channel;
 

Modified: trunk/app/gegl/gimpoperationposterize.c
==============================================================================
--- trunk/app/gegl/gimpoperationposterize.c	(original)
+++ trunk/app/gegl/gimpoperationposterize.c	Mon Jan 28 20:42:48 2008
@@ -84,12 +84,11 @@
   gfloat                   *src    = in_buf;
   gfloat                   *dest   = out_buf;
   gfloat                    levels = config->levels - 1.0;
-  glong                     sample;
 
   if (! config)
     return FALSE;
 
-  for (sample = 0; sample < samples; sample++)
+  while (samples--)
     {
       dest[RED_PIX]   = RINT (src[RED_PIX]   * levels) / levels;
       dest[GREEN_PIX] = RINT (src[GREEN_PIX] * levels) / levels;

Modified: trunk/app/gegl/gimpoperationthreshold.c
==============================================================================
--- trunk/app/gegl/gimpoperationthreshold.c	(original)
+++ trunk/app/gegl/gimpoperationthreshold.c	Mon Jan 28 20:42:48 2008
@@ -82,12 +82,11 @@
   GimpThresholdConfig      *config = GIMP_THRESHOLD_CONFIG (point->config);
   gfloat                   *src    = in_buf;
   gfloat                   *dest   = out_buf;
-  glong                     sample;
 
   if (! config)
     return FALSE;
 
-  for (sample = 0; sample < samples; sample++)
+  while (samples--)
     {
       gfloat value;
 



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