[gimp/metadata-browser] blur-motion: Move variables into inner block, where they're used



commit 1ed4f4cb4cd1e0190fd0e52b2f344b36ffe36d09
Author: Mukund Sivaraman <muks banu com>
Date:   Thu Oct 6 08:41:42 2011 +0530

    blur-motion: Move variables into inner block, where they're used

 plug-ins/common/blur-motion.c |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/plug-ins/common/blur-motion.c b/plug-ins/common/blur-motion.c
index 01976fc..bed7d9d 100644
--- a/plug-ins/common/blur-motion.c
+++ b/plug-ins/common/blur-motion.c
@@ -314,7 +314,7 @@ mblur_linear (GimpDrawable *drawable,
   gint32  sum[4];
   gint    progress, max_progress;
   gint    c, p;
-  gint    x, y, i, xx, yy, n;
+  gint    x, y, i, n;
   gint    dx, dy, px, py, swapdir, err, e, s1, s2;
 
   gimp_pixel_rgn_init (&dest_rgn, drawable,
@@ -389,7 +389,12 @@ mblur_linear (GimpDrawable *drawable,
 
           for (x = dest_rgn.x; x < dest_rgn.x + dest_rgn.w; x++)
             {
-              xx = x; yy = y; e = err;
+              gint xx, yy;
+
+              xx = x;
+              yy = y;
+              e = err;
+
               for (c = 0; c < img_bpp; c++)
                 sum[c]= 0;
 
@@ -504,15 +509,12 @@ mblur_radial (GimpDrawable *drawable,
   gint      progress, max_progress, c;
 
   gint      x, y, i, p, n, count;
-  gdouble   angle, theta, r, xx, yy, xr, yr;
+  gdouble   angle, theta, r, xr, yr;
   gdouble   phi, phi_start, s_val, c_val;
   gdouble   dx, dy;
 
   /* initialize */
 
-  xx = 0.0;
-  yy = 0.0;
-
   center_x = mbvals.center_x;
   center_y = mbvals.center_y;
 
@@ -541,6 +543,9 @@ mblur_radial (GimpDrawable *drawable,
 
           for (x = dest_rgn.x; x < dest_rgn.x + dest_rgn.w; x++)
             {
+              gdouble xx = 0.0;
+              gdouble yy = 0.0;
+
               xr = (gdouble) x - center_x;
               yr = (gdouble) y - center_y;
 
@@ -711,7 +716,6 @@ mblur_zoom (GimpDrawable *drawable,
   gint      progress, max_progress;
   gint      x, y, i, n, p, c;
   gdouble   xx_start, xx_end, yy_start, yy_end;
-  gdouble   xx, yy;
   gdouble   dxx, dyy;
   gdouble   dx, dy;
   gint      xy_len;
@@ -721,8 +725,6 @@ mblur_zoom (GimpDrawable *drawable,
 
   /* initialize */
 
-  xx = 0.0;
-  yy = 0.0;
   center_x = mbvals.center_x;
   center_y = mbvals.center_y;
 
@@ -761,6 +763,8 @@ mblur_zoom (GimpDrawable *drawable,
 
           for (x = dest_rgn.x; x < dest_rgn.x + dest_rgn.w; x++)
             {
+              gdouble xx, yy;
+
               for (c = 0; c < img_bpp; c++)
                 sum[c] = 0;
 



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