[gimp/soc-2011-seamless-clone2] app: Two mostly cosmetic changes



commit 1f6e51ce448e7dc6a27943df7b73fab737b44437
Author: Pedro Gimeno Fortea <pggit-2e67 personal formauri es>
Date:   Tue Apr 2 16:55:09 2013 +0200

    app: Two mostly cosmetic changes
    
    Use a temporary that is less expensive to refer to. Don't loop more
    than necessary when comparing pairs.

 app/display/gimpcanvastransformpreview.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/display/gimpcanvastransformpreview.c b/app/display/gimpcanvastransformpreview.c
index 3c78c05..bfa8a47 100644
--- a/app/display/gimpcanvastransformpreview.c
+++ b/app/display/gimpcanvastransformpreview.c
@@ -478,11 +478,11 @@ gimp_canvas_transform_preview_draw (GimpCanvasItem   *item,
     gdouble tx1, ty1;                                           \
     gdouble tx2, ty2;                                           \
                                                                 \
-    u[sub][index] = private->x1 + (dx * (col + (index & 1)));   \
-    v[sub][index] = private->y1 + (dy * (row + (index >> 1)));  \
+    tx2 = private->x1 + (dx * (col + (index & 1)));             \
+    ty2 = private->y1 + (dy * (row + (index >> 1)));            \
                                                                 \
     gimp_matrix3_transform_point (&private->transform,          \
-                                  u[sub][index], v[sub][index], \
+                                  tx2, ty2,                     \
                                   &tx1, &ty1);                  \
                                                                 \
     gimp_display_shell_transform_xy_f (shell,                   \
@@ -728,7 +728,7 @@ gimp_canvas_transform_preview_draw_tri (GimpDrawable    *texture,
 
   /* sort vertices in order of y-coordinate */
 
-  for (j = 0; j < 3; j++)
+  for (j = 0; j < 2; j++)
     for (k = j + 1; k < 3; k++)
       if (y[k] < y[j])
         {


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