Replace BLI_SMALLSTACK_FREE with fake user (quiet warnings in msvc)

This commit is contained in:
Campbell Barton 2014-07-12 16:48:52 +10:00
parent 5e3e095e2e
commit c04f301fc3
Notes: blender-bot 2023-12-22 20:14:11 +01:00
Referenced by issue #41066, Particle Carpet renders different in 2.71
5 changed files with 8 additions and 13 deletions

View File

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

View File

@ -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__ */

View File

@ -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 */

View File

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

View File

@ -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 */