diff options
-rw-r--r-- | intern/cycles/util/util_opencl.cpp | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_solidify.c | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/intern/cycles/util/util_opencl.cpp b/intern/cycles/util/util_opencl.cpp index 1e67afb3fa8..c2d6bc66dc1 100644 --- a/intern/cycles/util/util_opencl.cpp +++ b/intern/cycles/util/util_opencl.cpp @@ -333,3 +333,5 @@ const char *clErrorString(cl_int error) CCL_NAMESPACE_END +#ifdef CLCC_DYNLIB_CLOSE +#endif diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 97f229439e6..8e2cecf6a48 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -310,22 +310,19 @@ static DerivedMesh *applyModifier( } for (i = 0, mp = orig_mpoly; i < numFaces; i++, mp++) { - unsigned int ml_v1; - unsigned int ml_v2; int j; ml = orig_mloop + mp->loopstart; - for (j = 0, ml_v2 = ml[mp->totloop - 1].v; - j < mp->totloop; - j++, ml++, ml_v2 = ml_v1) - { - ml_v1 = ml->v; + for (j = 0; j < mp->totloop; j++, ml++) { /* add edge user */ eidx = ml->e; if (edge_users[eidx] == INVALID_UNUSED) { + unsigned int ml_v_next = (j + 1 != mp->totloop) ? ml[1].v : ml[-j].v; ed = orig_medge + eidx; - edge_users[eidx] = (ml_v1 < ml_v2) == (ed->v1 < ed->v2) ? i : (i + numFaces); + BLI_assert(ELEM(ml->v, ed->v1, ed->v2) && + ELEM(ml_v_next, ed->v1, ed->v2)); + edge_users[eidx] = (ml->v > ml_v_next) == (ed->v1 < ed->v2) ? i : (i + numFaces); edge_order[eidx] = j; } else { |