[Bf-blender-cvs] [eab69d49308] master: Cleanup: Use c++-style unused paramter form in automasking code.

Joseph Eagar noreply at git.blender.org
Thu Sep 29 08:39:35 CEST 2022


Commit: eab69d49308fa7efda428f95b9808394b8fba033
Author: Joseph Eagar
Date:   Wed Sep 28 23:38:48 2022 -0700
Branches: master
https://developer.blender.org/rBeab69d49308fa7efda428f95b9808394b8fba033

Cleanup: Use c++-style unused paramter form in automasking code.

Also renamed shadowed variable in sculpt_filter_mesh.c

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

M	source/blender/editors/sculpt_paint/sculpt_automasking.cc
M	source/blender/editors/sculpt_paint/sculpt_filter_mesh.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_automasking.cc b/source/blender/editors/sculpt_paint/sculpt_automasking.cc
index 100eb69ac48..a95d499c0da 100644
--- a/source/blender/editors/sculpt_paint/sculpt_automasking.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_automasking.cc
@@ -133,7 +133,7 @@ static int sculpt_automasking_mode_effective_bits(const Sculpt *sculpt, const Br
   return sculpt->automasking_flags;
 }
 
-bool SCULPT_automasking_needs_normal(const SculptSession *UNUSED(ss),
+bool SCULPT_automasking_needs_normal(const SculptSession * /*ss*/,
                                      const Sculpt *sculpt,
                                      const Brush *brush)
 {
@@ -244,7 +244,7 @@ static float automasking_view_occlusion_factor(AutomaskingCache *automasking,
                                                SculptSession *ss,
                                                PBVHVertRef vertex,
                                                uchar stroke_id,
-                                               AutomaskingNodeData *UNUSED(automask_data))
+                                               AutomaskingNodeData * /*automask_data*/)
 {
   char f = *(char *)SCULPT_vertex_attr_get(vertex, ss->attrs.automasking_occlusion);
 
@@ -600,11 +600,8 @@ struct AutomaskFloodFillData {
   char symm;
 };
 
-static bool automask_floodfill_cb(SculptSession *ss,
-                                  PBVHVertRef from_v,
-                                  PBVHVertRef to_v,
-                                  bool UNUSED(is_duplicate),
-                                  void *userdata)
+static bool automask_floodfill_cb(
+    SculptSession *ss, PBVHVertRef from_v, PBVHVertRef to_v, bool /*is_duplicate*/, void *userdata)
 {
   AutomaskFloodFillData *data = (AutomaskFloodFillData *)userdata;
 
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
index 4e481da03bc..65868ccf8fb 100644
--- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
+++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
@@ -192,14 +192,14 @@ void SCULPT_filter_cache_init(bContext *C,
       radius = paint_calc_object_space_radius(&vc, co, (float)ups->size * area_normal_radius);
     }
 
-    SculptSearchSphereData search_data = {
+    SculptSearchSphereData search_data2 = {
         .original = true,
         .center = co,
         .radius_squared = radius * radius,
         .ignore_fully_ineffective = true,
     };
 
-    BKE_pbvh_search_gather(pbvh, SCULPT_search_sphere_cb, &search_data, &nodes, &totnode);
+    BKE_pbvh_search_gather(pbvh, SCULPT_search_sphere_cb, &search_data2, &nodes, &totnode);
 
     if (SCULPT_pbvh_calc_area_normal(
             brush, ob, nodes, totnode, true, ss->filter_cache->initial_normal)) {



More information about the Bf-blender-cvs mailing list