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

Also renamed shadowed variable in sculpt_filter_mesh.c
This commit is contained in:
Joseph Eagar
2022-09-28 23:38:48 -07:00
parent 0de9081e89
commit eab69d4930
2 changed files with 6 additions and 9 deletions

View File

@@ -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;

View File

@@ -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)) {