[Bf-blender-cvs] [e3204db7478] master: Cleanup: warnings, set but unused vars

Campbell Barton noreply at git.blender.org
Fri Nov 22 03:10:29 CET 2019


Commit: e3204db7478343aa82d859e544ab0264376e9282
Author: Campbell Barton
Date:   Fri Nov 22 13:10:01 2019 +1100
Branches: master
https://developer.blender.org/rBe3204db7478343aa82d859e544ab0264376e9282

Cleanup: warnings, set but unused vars

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

M	source/blender/editors/sculpt_paint/paint_cursor.c
M	source/blender/editors/sculpt_paint/sculpt.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index ac738f326a3..78c9980134f 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -1216,7 +1216,7 @@ static void sculpt_geometry_preview_lines_draw(const uint gpuattr, SculptSession
 
 static void sculpt_multiplane_scrape_preview_draw(const uint gpuattr,
                                                   SculptSession *ss,
-                                                  float *outline_col,
+                                                  const float outline_col[3],
                                                   float outline_alpha)
 {
   float local_mat_inv[4][4];
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 9ae91947a38..7d63087e255 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -3214,11 +3214,10 @@ static void do_topology_relax_task_cb_ex(void *__restrict userdata,
 
   PBVHVertexIter vd;
   SculptOrigVertData orig_data;
-  float(*proxy)[3];
 
   sculpt_orig_vert_data_init(&orig_data, data->ob, data->nodes[n]);
 
-  proxy = BKE_pbvh_node_add_proxy(ss->pbvh, data->nodes[n])->co;
+  BKE_pbvh_node_add_proxy(ss->pbvh, data->nodes[n]);
 
   SculptBrushTest test;
   SculptBrushTestFn sculpt_brush_test_sq_fn = sculpt_brush_test_init_with_falloff_shape(
@@ -4984,7 +4983,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
       .area_co = ss->cache->location,
   };
 
-  ClaySampleData csd = {{{0}}};
+  ClaySampleData csd = {{0}};
 
   PBVHParallelSettings sample_settings;
   BKE_pbvh_parallel_range_settings(&sample_settings, (sd->flags & SCULPT_USE_OPENMP), totnode);
@@ -4994,14 +4993,6 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
 
   BKE_pbvh_parallel_range(0, totnode, &sample_data, calc_clay_surface_task_cb, &sample_settings);
 
-  float d_bstrength;
-  if (flip) {
-    d_bstrength = -csd.plane_dist[1];
-  }
-  else {
-    d_bstrength = csd.plane_dist[0];
-  }
-
   float d_offset = (csd.plane_dist[0] + csd.plane_dist[1]);
   d_offset = min_ff(radius, d_offset);
   d_offset = d_offset / radius;
@@ -9153,11 +9144,6 @@ static int sculpt_mesh_filter_modal(bContext *C, wmOperator *op, const wmEvent *
   bool needs_pmap = sculpt_mesh_filter_needs_pmap(filter_type);
   BKE_sculpt_update_object_for_edit(depsgraph, ob, needs_pmap, false);
 
-  int max_it = 1;
-  if (filter_type == MESH_FILTER_RELAX) {
-    max_it = (int)filter_strength * 2;
-  }
-
   SculptThreadedTaskData data = {
       .sd = sd,
       .ob = ob,



More information about the Bf-blender-cvs mailing list