From 97746129d5870beedc40e3c035c7982ce8a6bebc Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 3 Oct 2022 17:37:25 -0500 Subject: 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*/` --- source/blender/simulation/intern/SIM_mass_spring.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'source/blender/simulation') 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; -- cgit v1.2.3