[Bf-blender-cvs] [1ddc12ceb92] master: Cleanup: unused warnings

Campbell Barton noreply at git.blender.org
Thu Aug 15 09:57:22 CEST 2019


Commit: 1ddc12ceb922241d485ac9a1842c4c6f3d4ab300
Author: Campbell Barton
Date:   Thu Aug 15 16:39:57 2019 +1000
Branches: master
https://developer.blender.org/rB1ddc12ceb922241d485ac9a1842c4c6f3d4ab300

Cleanup: unused warnings

Reminder not to leave in unused code, or comment why it should be kept.

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

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

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index cdd82b8ced3..4b47c521ca9 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -96,6 +96,9 @@
 
 /* Do not use these functions while working with PBVH_GRIDS data in SculptSession */
 
+/* TODO: why is this kept, should it be removed? */
+#if 0 /* UNUSED */
+
 static int sculpt_active_vertex_get(SculptSession *ss)
 {
   switch (BKE_pbvh_type(ss->pbvh)) {
@@ -206,7 +209,7 @@ static void sculpt_vertex_tag_update(SculptSession *ss, int index)
   }
 }
 
-#define SCULPT_VERTEX_NEIGHBOUR_FIXED_CAPACITY 256
+#  define SCULPT_VERTEX_NEIGHBOUR_FIXED_CAPACITY 256
 
 typedef struct SculptVertexNeighbourIter {
   int *neighbours;
@@ -309,17 +312,19 @@ static void sculpt_vertex_neighbours_get(SculptSession *ss,
   }
 }
 
-#define sculpt_vertex_neighbours_iter_begin(ss, v_index, neighbour_iterator) \
-  sculpt_vertex_neighbours_get(ss, v_index, &neighbour_iterator); \
-  for (neighbour_iterator.i = 0; neighbour_iterator.i < neighbour_iterator.size; \
-       neighbour_iterator.i++) { \
-    neighbour_iterator.index = ni.neighbours[ni.i];
+#  define sculpt_vertex_neighbours_iter_begin(ss, v_index, neighbour_iterator) \
+    sculpt_vertex_neighbours_get(ss, v_index, &neighbour_iterator); \
+    for (neighbour_iterator.i = 0; neighbour_iterator.i < neighbour_iterator.size; \
+         neighbour_iterator.i++) { \
+      neighbour_iterator.index = ni.neighbours[ni.i];
 
-#define sculpt_vertex_neighbours_iter_end(neighbour_iterator) \
-  } \
-  if (neighbour_iterator.neighbours != neighbour_iterator.neighbours_fixed) { \
-    MEM_freeN(neighbour_iterator.neighbours); \
-  }
+#  define sculpt_vertex_neighbours_iter_end(neighbour_iterator) \
+    } \
+    if (neighbour_iterator.neighbours != neighbour_iterator.neighbours_fixed) { \
+      MEM_freeN(neighbour_iterator.neighbours); \
+    }
+
+#endif /* UNUSED */
 
 /** \name Tool Capabilities
  *



More information about the Bf-blender-cvs mailing list