[gimp/gimp-2-8] app: Two mostly cosmetic changes



commit e12243e94e8727d576dac386444bf3218789b1b4
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. (Cherry-picked from master's
    commit c83e7790bf13d207e9cb0bba8b9de1fb6b950b0f)

 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 ebb99fa..c18e1d5 100644
--- a/app/display/gimpcanvastransformpreview.c
+++ b/app/display/gimpcanvastransformpreview.c
@@ -480,11 +480,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,                   \
@@ -730,7 +730,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]