[gtk+] colorscale: modify loop variables in loop body



commit 84739239cec4e961ecb3a1ac18219dc591458b26
Author: Ben Iofel <iofelben gmail com>
Date:   Mon Oct 17 10:14:19 2016 -0400

    colorscale: modify loop variables in loop body

 gtk/gtkcolorscale.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcolorscale.c b/gtk/gtkcolorscale.c
index 0fbbf70..7815455 100644
--- a/gtk/gtkcolorscale.c
+++ b/gtk/gtkcolorscale.c
@@ -96,11 +96,11 @@ gtk_color_scale_draw_trough (GtkColorScale  *scale,
       data = g_malloc (height * stride);
 
       f = 1.0 / (height - 1);
-      for (hue_y = 0; hue_y < height; y++)
+      for (hue_y = 0; hue_y < height; hue_y++)
         {
           h = CLAMP (hue_y * f, 0.0, 1.0);
           p = data + hue_y * (stride / 4);
-          for (hue_x = 0; hue_x < width; x++)
+          for (hue_x = 0; hue_x < width; hue_x++)
             {
               gtk_hsv_to_rgb (h, 1, 1, &r, &g, &b);
               red = CLAMP (r * 255, 0, 255);


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