diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-09-07 17:12:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-09-07 17:23:25 +0300 |
commit | 0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 (patch) | |
tree | 0283a5c819d1e709edfd0de814636aa83a9b1033 /source/blender/physics/intern/BPH_mass_spring.cpp | |
parent | ab823176d31dc155645de733f1cd4fbd6ad74592 (diff) |
Cleanup: use post increment/decrement
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
Diffstat (limited to 'source/blender/physics/intern/BPH_mass_spring.cpp')
-rw-r--r-- | source/blender/physics/intern/BPH_mass_spring.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp index ce0dc1b49e0..c057e74b72b 100644 --- a/source/blender/physics/intern/BPH_mass_spring.cpp +++ b/source/blender/physics/intern/BPH_mass_spring.cpp @@ -231,9 +231,9 @@ static void cloth_setup_constraints(ClothModifierData *clmd, verts[v].impulse_count = 0; } - for (i = 0; i < totcolliders; ++i) { + for (i = 0; i < totcolliders; i++) { ColliderContacts *ct = &contacts[i]; - for (j = 0; j < ct->totcollisions; ++j) { + for (j = 0; j < ct->totcollisions; j++) { CollPair *collpair = &ct->collisions[j]; // float restitution = (1.0f - clmd->coll_parms->damping) * (1.0f - ct->ob->pd->pdef_sbdamp); float restitution = 0.0f; @@ -867,8 +867,8 @@ static void cloth_continuum_step(ClothModifierData *clmd, float dt) clmd->hair_grid_min[(axis + 2) % 3]; BKE_sim_debug_data_clear_category(clmd->debug_data, "grid velocity"); - for (j = 0; j < size; ++j) { - for (i = 0; i < size; ++i) { + for (j = 0; j < size; j++) { + for (i = 0; i < size; i++) { float x[3], v[3], gvel[3], gvel_smooth[3], gdensity; madd_v3_v3v3fl(x, offset, a, (float)i / (float)(size - 1)); |