From 926f52edf0079196ea3e70aa9c7fbe327ccc029a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 6 Mar 2020 15:52:36 +0100 Subject: Sculpt: Cleanup, remove macro re-definition --- source/blender/editors/sculpt_paint/sculpt.c | 24 ---------------------- .../blender/editors/sculpt_paint/sculpt_intern.h | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index d4c9859b19b..dcbcdc98ddf 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -589,30 +589,6 @@ void SCULPT_vertex_neighbors_get(SculptSession *ss, } } -/* Iterator over neighboring vertices. */ -#define sculpt_vertex_neighbors_iter_begin(ss, v_index, neighbor_iterator) \ - SCULPT_vertex_neighbors_get(ss, v_index, false, &neighbor_iterator); \ - for (neighbor_iterator.i = 0; neighbor_iterator.i < neighbor_iterator.size; \ - neighbor_iterator.i++) { \ - neighbor_iterator.index = ni.neighbors[ni.i]; - -/* Iterate over neighboring and duplicate vertices (for PBVH_GRIDS). Duplicates come - * first since they are nearest for floodfill. */ -#define sculpt_vertex_duplicates_and_neighbors_iter_begin(ss, v_index, neighbor_iterator) \ - SCULPT_vertex_neighbors_get(ss, v_index, true, &neighbor_iterator); \ - for (neighbor_iterator.i = neighbor_iterator.size - 1; neighbor_iterator.i >= 0; \ - neighbor_iterator.i--) { \ - neighbor_iterator.index = ni.neighbors[ni.i]; \ - neighbor_iterator.is_duplicate = (ni.i >= \ - neighbor_iterator.size - neighbor_iterator.num_duplicates); - -#define sculpt_vertex_neighbors_iter_end(neighbor_iterator) \ - } \ - if (neighbor_iterator.neighbors != neighbor_iterator.neighbors_fixed) { \ - MEM_freeN(neighbor_iterator.neighbors); \ - } \ - ((void)0) - /* Utils */ bool SCULPT_check_vertex_pivot_symmetry(const float vco[3], const float pco[3], const char symm) { diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index f5bd327a615..e65b7404558 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -111,7 +111,7 @@ void SCULPT_vertex_neighbors_get(struct SculptSession *ss, /* Iterate over neighboring and duplicate vertices (for PBVH_GRIDS). Duplicates come * first since they are nearest for floodfill. */ #define sculpt_vertex_duplicates_and_neighbors_iter_begin(ss, v_index, neighbor_iterator) \ - sculpt_vertex_neighbors_get(ss, v_index, true, &neighbor_iterator); \ + SCULPT_vertex_neighbors_get(ss, v_index, true, &neighbor_iterator); \ for (neighbor_iterator.i = neighbor_iterator.size - 1; neighbor_iterator.i >= 0; \ neighbor_iterator.i--) { \ neighbor_iterator.index = ni.neighbors[ni.i]; \ -- cgit v1.2.3