diff options
author | Hans Goudey <h.goudey@me.com> | 2022-10-04 01:37:25 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-10-04 01:38:16 +0300 |
commit | 97746129d5870beedc40e3c035c7982ce8a6bebc (patch) | |
tree | b819b8e7875e6684aad7ea1f6bb7922d4fa1c8fc /source/blender/simulation | |
parent | ed7f5713f8f9d605e3cd4cce42e40fb5c6bf4bf5 (diff) |
Cleanup: replace UNUSED macro with commented args in C++ code
This is the conventional way of dealing with unused arguments in C++,
since it works on all compilers.
Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
Diffstat (limited to 'source/blender/simulation')
-rw-r--r-- | source/blender/simulation/intern/SIM_mass_spring.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/simulation/intern/SIM_mass_spring.cpp b/source/blender/simulation/intern/SIM_mass_spring.cpp index b1782d67a04..8e2c7d641ab 100644 --- a/source/blender/simulation/intern/SIM_mass_spring.cpp +++ b/source/blender/simulation/intern/SIM_mass_spring.cpp @@ -175,7 +175,7 @@ static float cloth_calc_average_pressure(ClothModifierData *clmd, const float *v return total_force / total_area; } -int SIM_cloth_solver_init(Object *UNUSED(ob), ClothModifierData *clmd) +int SIM_cloth_solver_init(Object * /*ob*/, ClothModifierData *clmd) { Cloth *cloth = clmd->clothObject; ClothVertex *verts = cloth->verts; @@ -271,11 +271,8 @@ static void cloth_setup_constraints(ClothModifierData *clmd) * (edge distance constraints) in a lagrangian solver. Then add forces to help * guide the implicit solver to that state. This function is called after collisions. */ -static int UNUSED_FUNCTION(cloth_calc_helper_forces)(Object *UNUSED(ob), - ClothModifierData *clmd, - float (*initial_cos)[3], - float UNUSED(step), - float dt) +static int UNUSED_FUNCTION(cloth_calc_helper_forces)( + Object * /*ob*/, ClothModifierData *clmd, float (*initial_cos)[3], float /*step*/, float dt) { Cloth *cloth = clmd->clothObject; float(*cos)[3] = (float(*)[3])MEM_callocN(sizeof(float[3]) * cloth->mvert_num, @@ -564,7 +561,7 @@ static void hair_get_boundbox(ClothModifierData *clmd, float gmin[3], float gmax } static void cloth_calc_force( - Scene *scene, ClothModifierData *clmd, float UNUSED(frame), ListBase *effectors, float time) + Scene *scene, ClothModifierData *clmd, float /*frame*/, ListBase *effectors, float time) { /* Collect forces and derivatives: F, dFdX, dFdV */ Cloth *cloth = clmd->clothObject; |