diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-02-22 17:41:41 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-02-22 17:41:41 +0300 |
commit | 5f857378afd7939d6c49b46936c1afd5eaab098c (patch) | |
tree | 2104525b48b09df4529e77c74b13741bb26d2629 /source/blender/blenkernel | |
parent | 0eee776e454f6b78ffa33b2ed8b19c747d8193ec (diff) |
Cleanup: Fix const pointers mess in previous commit.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_evaluate.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c index a4cc6913fd9..788ebe4119f 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.c +++ b/source/blender/blenkernel/intern/mesh_evaluate.c @@ -698,10 +698,11 @@ static void mesh_edges_sharp_tag( LoopSplitTaskDataCommon *data, const bool check_angle, const float split_angle, const bool do_sharp_edges_tag) { - MVert *mverts = data->mverts; - MEdge *medges = data->medges; - MLoop *mloops = data->mloops; - MPoly *mpolys = data->mpolys; + const MVert *mverts = data->mverts; + const MEdge *medges = data->medges; + const MLoop *mloops = data->mloops; + + const MPoly *mpolys = data->mpolys; const int numEdges = data->numEdges; const int numPolys = data->numPolys; @@ -714,13 +715,13 @@ static void mesh_edges_sharp_tag( BLI_bitmap *sharp_edges = do_sharp_edges_tag ? BLI_BITMAP_NEW(numEdges, __func__) : NULL; - MPoly *mp; + const MPoly *mp; int mp_index; const float split_angle_cos = check_angle ? cosf(split_angle) : -1.0f; for (mp = mpolys, mp_index = 0; mp_index < numPolys; mp++, mp_index++) { - MLoop *ml_curr; + const MLoop *ml_curr; int *e2l; int ml_curr_index = mp->loopstart; const int ml_last_index = (ml_curr_index + mp->totloop) - 1; @@ -728,8 +729,6 @@ static void mesh_edges_sharp_tag( ml_curr = &mloops[ml_curr_index]; for (; ml_curr_index <= ml_last_index; ml_curr++, ml_curr_index++) { - MEdge *me = &medges[ml_curr->e]; - e2l = edge_to_loops[ml_curr->e]; loop_to_poly[ml_curr_index] = mp_index; @@ -757,7 +756,7 @@ static void mesh_edges_sharp_tag( * or both poly have opposed (flipped) normals, i.e. both loops on the same edge share the same vertex, * or angle between both its polys' normals is above split_angle value. */ - if (!(mp->flag & ME_SMOOTH) || (me->flag & ME_SHARP) || + if (!(mp->flag & ME_SMOOTH) || (medges[ml_curr->e].flag & ME_SHARP) || ml_curr->v == mloops[e2l[0]].v || is_angle_sharp) { @@ -792,7 +791,7 @@ static void mesh_edges_sharp_tag( if (do_sharp_edges_tag) { MEdge *me; int me_index; - for (me = medges, me_index = 0; me_index < numEdges; me++, me_index++) { + for (me = (MEdge *)medges, me_index = 0; me_index < numEdges; me++, me_index++) { if (BLI_BITMAP_TEST(sharp_edges, me_index)) { me->flag |= ME_SHARP; } |