diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:22:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:25:15 +0400 |
commit | c67bd49e5607cc3db7446d4b12e1346fc9b2c83a (patch) | |
tree | bffbca1613b3ce8a5e356110c0d35b38dd6537cf /source/blender/editors/mesh | |
parent | f2d25975b5e90f89744be733b81462493dc57977 (diff) |
Code cleanup: use 'const' for arrays (editors)
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editface.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 9e1785e27d1..1c5036ccf80 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -66,7 +66,7 @@ void paintface_flush_flags(Object *ob) DerivedMesh *dm = ob->derivedFinal; MPoly *polys, *mp_orig; MFace *faces; - int *index_array = NULL; + const int *index_array = NULL; int totface, totpoly; int i; @@ -499,7 +499,7 @@ void paintvert_flush_flags(Object *ob) Mesh *me = BKE_mesh_from_object(ob); DerivedMesh *dm = ob->derivedFinal; MVert *dm_mvert, *dm_mv; - int *index_array = NULL; + const int *index_array = NULL; int totvert; int i; diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index d973523437d..cf2528366e6 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -2934,7 +2934,7 @@ static void edvm_mesh_knife_face_point(BMFace *f, float r_cent[3]) unsigned int (*index)[3] = BLI_array_alloca(index, tottri); int j; - float const *best_co[3] = {NULL}; + const float const *best_co[3] = {NULL}; float best_area = -1.0f; bool ok = false; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 90e1c916029..45099166bf4 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2071,7 +2071,7 @@ static int edbm_blend_from_shape_exec(bContext *C, wmOperator *op) if (use_add) { /* in add mode, we add relative shape key offset */ if (kb) { - float *rco = CustomData_bmesh_get_n(&em->bm->vdata, eve->head.data, CD_SHAPEKEY, kb->relative); + const float *rco = CustomData_bmesh_get_n(&em->bm->vdata, eve->head.data, CD_SHAPEKEY, kb->relative); sub_v3_v3v3(co, co, rco); } @@ -2652,7 +2652,7 @@ static void mesh_separate_material_assign_mat_nr(Object *ob, const short mat_nr) ID *obdata = ob->data; Material ***matarar; - short *totcolp; + const short *totcolp; totcolp = give_totcolp_id(obdata); matarar = give_matarar_id(obdata); @@ -4263,7 +4263,7 @@ static void sort_bmelem_flag(Scene *scene, Object *ob, pb = pblock[j]; sb = sblock[j]; if (pb && sb && !map[j]) { - char *p_blk; + const char *p_blk; BMElemSort *s_blk; int tot = totelem[j]; int aff = affected[j]; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index b84a0cc6600..8b72e153852 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -1135,7 +1135,7 @@ void EDBM_verts_mirror_cache_begin(BMEditMesh *em, const int axis, BMVert *EDBM_verts_mirror_get(BMEditMesh *em, BMVert *v) { - int *mirr = CustomData_bmesh_get_layer_n(&em->bm->vdata, v->head.data, em->mirror_cdlayer); + const int *mirr = CustomData_bmesh_get_layer_n(&em->bm->vdata, v->head.data, em->mirror_cdlayer); BLI_assert(em->mirror_cdlayer != -1); /* invalid use */ |