diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-02 16:09:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-02 16:09:49 +0400 |
commit | 622ac0dd1682fd4949319817fd6e58fc7d7c86ed (patch) | |
tree | c52790d29ae0d7f405ad8482b6e4d68a358ea1ac /source/blender/editors/mesh/knifetool.c | |
parent | cf927d3fd149cbbba4732c789ccbac239f4000f3 (diff) |
code cleanup:
replace casts: '((Mesh *)ob->data)->edit_btmesh' with 'BMEdit_FromObject(ob)'
also minor style edits.
Diffstat (limited to 'source/blender/editors/mesh/knifetool.c')
-rw-r--r-- | source/blender/editors/mesh/knifetool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/knifetool.c b/source/blender/editors/mesh/knifetool.c index 86e02d44de9..3b78ceada98 100644 --- a/source/blender/editors/mesh/knifetool.c +++ b/source/blender/editors/mesh/knifetool.c @@ -2051,7 +2051,7 @@ static int knifetool_init(bContext *C, wmOperator *op, int UNUSED(do_cut)) kcd->draw_handle = ED_region_draw_cb_activate(kcd->ar->type, knifetool_draw, kcd, REGION_DRAW_POST_VIEW); em_setup_viewcontext(C, &kcd->vc); - kcd->em = ((Mesh *)kcd->ob->data)->edit_btmesh; + kcd->em = BMEdit_FromObject(kcd->ob); BM_mesh_elem_index_ensure(kcd->em->bm, BM_VERT); @@ -2185,7 +2185,7 @@ static int knifetool_modal (bContext *C, wmOperator *op, wmEvent *event) } obedit = CTX_data_edit_object(C); - if (!obedit || obedit->type != OB_MESH || ((Mesh *)obedit->data)->edit_btmesh != kcd->em) { + if (!obedit || obedit->type != OB_MESH || BMEdit_FromObject(obedit) != kcd->em) { knifetool_exit(C, op); return OPERATOR_FINISHED; } |