forked from bartvdbraak/blender
Fix mismatch (missing 'const' to mactch funcs declarations).
Was breaking windows compile, reported by bdancer over IRC, thanks. Also, quite some annoying 'unused vars' warnings (debug-only vars).
This commit is contained in:
parent
fed61d50c7
commit
ced19783fd
@ -821,6 +821,7 @@ void BM_data_layer_free(BMesh *bm, CustomData *data, int type)
|
||||
has_layer = CustomData_free_layer_active(data, type, 0);
|
||||
/* assert because its expensive to realloc - better not do if layer isnt present */
|
||||
BLI_assert(has_layer != false);
|
||||
UNUSED_VARS_NDEBUG(has_layer);
|
||||
|
||||
update_data_blocks(bm, &olddata, data);
|
||||
if (olddata.layers) MEM_freeN(olddata.layers);
|
||||
@ -840,7 +841,8 @@ void BM_data_layer_free_n(BMesh *bm, CustomData *data, int type, int n)
|
||||
has_layer = CustomData_free_layer(data, type, 0, CustomData_get_layer_index_n(data, type, n));
|
||||
/* assert because its expensive to realloc - better not do if layer isnt present */
|
||||
BLI_assert(has_layer != false);
|
||||
|
||||
UNUSED_VARS_NDEBUG(has_layer);
|
||||
|
||||
update_data_blocks(bm, &olddata, data);
|
||||
if (olddata.layers) MEM_freeN(olddata.layers);
|
||||
}
|
||||
@ -1001,7 +1003,7 @@ static void bm_loop_walk_data(struct LoopWalkCtx *lwc, BMLoop *l_walk)
|
||||
}
|
||||
|
||||
LinkNode *BM_vert_loop_groups_data_layer_create(
|
||||
BMesh *bm, BMVert *v, int layer_n, const float *loop_weights, MemArena *arena)
|
||||
BMesh *bm, BMVert *v, const int layer_n, const float *loop_weights, MemArena *arena)
|
||||
{
|
||||
struct LoopWalkCtx lwc;
|
||||
LinkNode *groups = NULL;
|
||||
@ -1135,7 +1137,8 @@ void BM_vert_loop_groups_data_layer_merge(BMesh *bm, LinkNode *groups, const int
|
||||
* A version of #BM_vert_loop_groups_data_layer_merge
|
||||
* that takes an array of loop-weights (aligned with #BM_LOOPS_OF_VERT iterator)
|
||||
*/
|
||||
void BM_vert_loop_groups_data_layer_merge_weights(BMesh *bm, LinkNode *groups, int layer_n, const float *loop_weights)
|
||||
void BM_vert_loop_groups_data_layer_merge_weights(
|
||||
BMesh *bm, LinkNode *groups, const int layer_n, const float *loop_weights)
|
||||
{
|
||||
const int type = bm->ldata.layers[layer_n].type;
|
||||
const int size = CustomData_sizeof(type);
|
||||
@ -1146,4 +1149,4 @@ void BM_vert_loop_groups_data_layer_merge_weights(BMesh *bm, LinkNode *groups, i
|
||||
} while ((groups = groups->next));
|
||||
}
|
||||
|
||||
/** \} */
|
||||
/** \} */
|
||||
|
@ -2178,6 +2178,7 @@ int BM_mesh_calc_face_groups(BMesh *bm, int *r_groups_array, int (**r_group_inde
|
||||
}
|
||||
|
||||
BLI_assert(ok == true);
|
||||
UNUSED_VARS_NDEBUG(ok);
|
||||
|
||||
/* manage arrays */
|
||||
if (group_index_len == group_curr) {
|
||||
@ -2332,6 +2333,7 @@ int BM_mesh_calc_edge_groups(BMesh *bm, int *r_groups_array, int (**r_group_inde
|
||||
}
|
||||
|
||||
BLI_assert(ok == true);
|
||||
UNUSED_VARS_NDEBUG(ok);
|
||||
|
||||
/* manage arrays */
|
||||
if (group_index_len == group_curr) {
|
||||
|
@ -723,6 +723,7 @@ static bool bm_edge_collapse(BMesh *bm, BMEdge *e_clear, BMVert *v_clear, int r_
|
||||
BLI_assert(ok == true);
|
||||
BLI_assert(l_a->f->len == 3);
|
||||
BLI_assert(l_b->f->len == 3);
|
||||
UNUSED_VARS_NDEBUG(ok);
|
||||
|
||||
/* keep 'v_clear' 0th */
|
||||
if (BM_vert_in_edge(l_a->prev->e, v_clear)) {
|
||||
|
@ -255,6 +255,7 @@ static PyObject *bpy_bm_utils_vert_splice(PyObject *UNUSED(self), PyObject *args
|
||||
/* should always succeed */
|
||||
ok = BM_vert_splice(bm, py_vert->v, py_vert_target->v);
|
||||
BLI_assert(ok == true);
|
||||
UNUSED_VARS_NDEBUG(ok);
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user