diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-07-12 10:48:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-07-12 10:48:52 +0400 |
commit | c04f301fc3bf5a21413bb0962c199f8eb49fbdaf (patch) | |
tree | 6ee5d8dca3c6ecd3fb0ad8d2e23c55468bbf8888 /source | |
parent | 5e3e095e2e474bbcba0060cb13f2869548091cd8 (diff) |
Replace BLI_SMALLSTACK_FREE with fake user (quiet warnings in msvc)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_evaluate.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_linklist_stack.h | 12 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 1 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 4 |
5 files changed, 8 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c index a9462aefa25..83b6d6c61d6 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.c +++ b/source/blender/blenkernel/intern/mesh_evaluate.c @@ -578,8 +578,6 @@ void BKE_mesh_normals_loop_split(MVert *mverts, const int UNUSED(numVerts), MEdg } } - BLI_SMALLSTACK_FREE(normal); - MEM_freeN(edge_to_loops); MEM_freeN(loop_to_poly); diff --git a/source/blender/blenlib/BLI_linklist_stack.h b/source/blender/blenlib/BLI_linklist_stack.h index 84e7130a962..17d40e068b3 100644 --- a/source/blender/blenlib/BLI_linklist_stack.h +++ b/source/blender/blenlib/BLI_linklist_stack.h @@ -116,6 +116,9 @@ # define _BLI_SMALLSTACK_CAST(var) #endif +#define _BLI_SMALLSTACK_FAKEUSER(var) \ + (void)(&(_##var##_type)) + #define BLI_SMALLSTACK_DECLARE(var, type) \ LinkNode *_##var##_stack = NULL, *_##var##_free = NULL, *_##var##_temp = NULL; \ type _##var##_type @@ -133,11 +136,14 @@ _##var##_temp->next = _##var##_stack; \ _##var##_temp->link = data; \ _##var##_stack = _##var##_temp; \ + _BLI_SMALLSTACK_FAKEUSER(var); \ } (void)0 /* internal use, no null check */ #define _BLI_SMALLSTACK_DEL_EX(var_src, var_dst) \ - (void)((_##var_src##_temp = _##var_src##_stack->next), \ + (void)(_BLI_SMALLSTACK_FAKEUSER(var_src), \ + _BLI_SMALLSTACK_FAKEUSER(var_dst), \ + (_##var_src##_temp = _##var_src##_stack->next), \ (_##var_src##_stack->next = _##var_dst##_free), \ (_##var_dst##_free = _##var_src##_stack), \ (_##var_src##_stack = _##var_src##_temp)) \ @@ -180,10 +186,6 @@ SWAP(LinkNode *, _##var_a##_free, _##var_b##_free); \ } (void)0 -#define BLI_SMALLSTACK_FREE(var) { \ - (void)&(_##var##_type); \ -} (void)0 - /** \} */ #endif /* __BLI_LINKLIST_STACK_H__ */ diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index c996a5bb6a8..a9e6dad7fd0 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -648,8 +648,6 @@ static void bm_mesh_loops_calc_normals(BMesh *bm, const float (*vcos)[3], const } } while ((l_curr = l_curr->next) != l_first); } - - BLI_SMALLSTACK_FREE(normal); } #if 0 /* Unused currently */ diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index ccc3e2e8278..9d27cf24197 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -2301,7 +2301,6 @@ static void vgroup_blend_subset(Object *ob, const bool *vgroup_validmap, const i if (dvert_array) MEM_freeN(dvert_array); - BLI_SMALLSTACK_FREE(dv_stack); /* not so efficient to get 'dvert_array' again just so unselected verts are NULL'd */ if (use_mirror) { diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 1727f38c4b3..400dd6fc28e 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1766,9 +1766,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char * break; } } - - BLI_SMALLSTACK_FREE(pt_stack); - + /* clear */ if (ar->overlap) { /* view should be in pixelspace */ |