Code cleanup: ifdef debug only checks and simplify manifold test

This commit is contained in:
Campbell Barton 2014-03-25 07:52:22 +11:00
parent b0a8e4ced1
commit 7bb84912ef
3 changed files with 4 additions and 5 deletions

@ -1692,12 +1692,12 @@ BMEdge *bmesh_jekv(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, const bool check_e
BLI_mempool_free(bm->lpool, loops[i]); BLI_mempool_free(bm->lpool, loops[i]);
} }
} }
#ifndef NDEBUG
/* Validate radial cycle of e_old */ /* Validate radial cycle of e_old */
edok = bmesh_radial_validate(radlen, e_old->l); edok = bmesh_radial_validate(radlen, e_old->l);
BMESH_ASSERT(edok != false); BMESH_ASSERT(edok != false);
#endif
} }
/* deallocate edge */ /* deallocate edge */
bm_kill_only_edge(bm, e_kill); bm_kill_only_edge(bm, e_kill);

@ -178,8 +178,7 @@ bool BM_disk_dissolve(BMesh *bm, BMVert *v)
e = v->e; e = v->e;
do { do {
f = NULL; f = NULL;
len = bmesh_radial_length(e->l); if (BM_edge_is_manifold(e) && (e != baseedge) && (e != keepedge)) {
if (len == 2 && (e != baseedge) && (e != keepedge)) {
f = BM_faces_join_pair(bm, e->l->f, e->l->radial_next->f, e, true); f = BM_faces_join_pair(bm, e->l->f, e->l->radial_next->f, e, true);
/* return if couldn't join faces in manifold /* return if couldn't join faces in manifold
* conditions */ * conditions */

@ -3823,7 +3823,7 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd
fdrawline((float)WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE, 0.0f, (float)WM_RADIAL_CONTROL_DISPLAY_SIZE, 0.0f); fdrawline((float)WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE, 0.0f, (float)WM_RADIAL_CONTROL_DISPLAY_SIZE, 0.0f);
glPopMatrix(); glPopMatrix();
rmin = WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE; rmin = WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE;
BLI_snprintf(str, WM_RADIAL_MAX_STR, "%3f", rc->current_value * 180.0f / M_PI); BLI_snprintf(str, WM_RADIAL_MAX_STR, "%3f", RAD2DEGF(rc->current_value));
strdrawlen = BLI_strlen_utf8(str); strdrawlen = BLI_strlen_utf8(str);
} }