diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:20:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:25:15 +0400 |
commit | a2c107aef1c8aaf7deb17dd0319bc07e55cb4293 (patch) | |
tree | ae3a039dc5b139a276243b4ae4eed1bbc90c84e2 /source/blender/blenkernel/intern/mesh_evaluate.c | |
parent | 11310b554ab2f08c9f0d086f5f07694ba7ca9f19 (diff) |
Code cleanup: use 'const' for arrays (blenkernel)
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_evaluate.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_evaluate.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c index 281e98e7b05..b272749a4bb 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.c +++ b/source/blender/blenkernel/intern/mesh_evaluate.c @@ -172,8 +172,8 @@ static void mesh_calc_normals_poly_accum(MPoly *mp, MLoop *ml, /* inline version of #BKE_mesh_calc_poly_normal, also does edge-vectors */ { int i_prev = nverts - 1; - float const *v_prev = mvert[ml[i_prev].v].co; - float const *v_curr; + const float const *v_prev = mvert[ml[i_prev].v].co; + const float const *v_curr; zero_v3(polyno); /* Newell's Method */ @@ -287,7 +287,7 @@ void BKE_mesh_calc_normals_tessface(MVert *mverts, int numVerts, MFace *mfaces, MFace *mf = &mfaces[i]; float *f_no = fnors[i]; float *n4 = (mf->v4) ? tnorms[mf->v4] : NULL; - float *c4 = (mf->v4) ? mverts[mf->v4].co : NULL; + const float *c4 = (mf->v4) ? mverts[mf->v4].co : NULL; if (mf->v4) normal_quad_v3(f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co, mverts[mf->v4].co); @@ -738,8 +738,8 @@ static void mesh_calc_ngon_normal(MPoly *mpoly, MLoop *loopstart, MVert *mvert, float normal[3]) { const int nverts = mpoly->totloop; - float const *v_prev = mvert[loopstart[nverts - 1].v].co; - float const *v_curr; + const float const *v_prev = mvert[loopstart[nverts - 1].v].co; + const float const *v_curr; int i; zero_v3(normal); @@ -788,8 +788,8 @@ static void mesh_calc_ngon_normal_coords(MPoly *mpoly, MLoop *loopstart, const float (*vertex_coords)[3], float normal[3]) { const int nverts = mpoly->totloop; - float const *v_prev = vertex_coords[loopstart[nverts - 1].v]; - float const *v_curr; + const float const *v_prev = vertex_coords[loopstart[nverts - 1].v]; + const float const *v_curr; int i; zero_v3(normal); @@ -1178,7 +1178,7 @@ void BKE_mesh_loops_to_tessdata(CustomData *fdata, CustomData *ldata, CustomData const bool hasOrigSpace = CustomData_has_layer(ldata, CD_ORIGSPACE_MLOOP); const bool hasLoopNormal = CustomData_has_layer(ldata, CD_NORMAL); int findex, i, j; - int *pidx; + const int *pidx; unsigned int (*lidx)[4]; for (i = 0; i < numTex; i++) { |