Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-02-23 15:55:11 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-02-23 15:57:02 +0300
commitced19783fdd31f127593f523772026a40f8655b4 (patch)
treeb36dad3654dbcdec0ed1059cf6a1934a9201329d /source/blender
parentfed61d50c77130bc59849b067d9f7a502908003f (diff)
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).
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/bmesh/intern/bmesh_interp.c11
-rw-r--r--source/blender/bmesh/intern/bmesh_queries.c2
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c1
-rw-r--r--source/blender/python/bmesh/bmesh_py_utils.c1
4 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c
index c0add425fa2..f745972293e 100644
--- a/source/blender/bmesh/intern/bmesh_interp.c
+++ b/source/blender/bmesh/intern/bmesh_interp.c
@@ -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));
}
-/** \} */ \ No newline at end of file
+/** \} */
diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c
index 4d2361afa3a..c3fa1e6902f 100644
--- a/source/blender/bmesh/intern/bmesh_queries.c
+++ b/source/blender/bmesh/intern/bmesh_queries.c
@@ -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) {
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
index 230cb302d28..811a144fc39 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
@@ -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)) {
diff --git a/source/blender/python/bmesh/bmesh_py_utils.c b/source/blender/python/bmesh/bmesh_py_utils.c
index 0b667ab9029..2e32a571e3c 100644
--- a/source/blender/python/bmesh/bmesh_py_utils.c
+++ b/source/blender/python/bmesh/bmesh_py_utils.c
@@ -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;
}