Commit: 3dd5adeed14518ff8b21343d6269732aa36e1cee
Author: Antony Riakiotakis
Date:   Tue Aug 26 12:38:06 2014 +0200
Branches: master
https://developer.blender.org/rB3dd5adeed14518ff8b21343d6269732aa36e1cee

Move conditional out of loop since checked condition won't change

===================================================================

M       source/blender/blenkernel/intern/implicit.c

===================================================================

diff --git a/source/blender/blenkernel/intern/implicit.c 
b/source/blender/blenkernel/intern/implicit.c
index 6682b1a..4d80256 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -1804,6 +1804,7 @@ static int 
UNUSED_FUNCTION(cloth_calc_helper_forces)(Object *UNUSED(ob), ClothMo
        
        return 1;
 }
+
 int implicit_solver(Object *ob, float frame, ClothModifierData *clmd, ListBase 
*effectors)
 {
        unsigned int i=0;
@@ -1888,10 +1889,8 @@ int implicit_solver(Object *ob, float frame, 
ClothModifierData *clmd, ListBase *
                        //if (do_extra_solve)
                        //      cloth_calc_helper_forces(ob, clmd, initial_cos, 
step/clmd->sim_parms->timescale, dt/clmd->sim_parms->timescale);
                        
-                       for (i = 0; i < numverts; i++) {
-
-                               if (do_extra_solve) {
-                                       
+                       if (do_extra_solve) {
+                               for (i = 0; i < numverts; i++) {                
                
                                        if ((clmd->sim_parms->flags & 
CLOTH_SIMSETTINGS_FLAG_GOAL) && (verts [i].flags & CLOTH_VERT_FLAG_PINNED))
                                                continue;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to