diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-07 03:41:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-07 03:41:03 +0400 |
commit | 0ecbc047e8a540175b00ed967050abb5f7363dbc (patch) | |
tree | fdf8a8011f919fb606b07d357a3be8b9606bf592 /source/blender/editors/mesh | |
parent | 774cc0ab1663a5d31eeda797ac71c5143086ca98 (diff) |
code cleanup
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_bvh.c | 8 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/mesh/editmesh_bvh.c b/source/blender/editors/mesh/editmesh_bvh.c index 549032f7286..c7e0077bc02 100644 --- a/source/blender/editors/mesh/editmesh_bvh.c +++ b/source/blender/editors/mesh/editmesh_bvh.c @@ -394,15 +394,15 @@ int BMBVH_EdgeVisible(BMBVHTree *tree, BMEdge *e, ARegion *ar, View3D *v3d, Obje float co1[3], co2[3], co3[3], dir1[4], dir2[4], dir3[4]; float origin[3], invmat[4][4]; float epsilon = 0.01f; - float mval_f[2], end[3]; + float end[3]; + const float mval_f[2] = {ar->winx / 2.0f, + ar->winy / 2.0f}; if (!ar) { printf("error in BMBVH_EdgeVisible!\n"); return 0; } - - mval_f[0] = ar->winx / 2.0f; - mval_f[1] = ar->winy / 2.0f; + ED_view3d_win_to_segment_clip(ar, v3d, mval_f, origin, end); invert_m4_m4(invmat, obedit->obmat); diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 92cc3366b3e..546b28bfb25 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -751,10 +751,8 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent float nor[3] = {0.0, 0.0, 0.0}; /* 2D normal calc */ - float mval_f[2]; - - mval_f[0] = (float)event->mval[0]; - mval_f[1] = (float)event->mval[1]; + const float mval_f[2] = {(float)event->mval[0], + (float)event->mval[1]}; /* check for edges that are half selected, use for rotation */ done = FALSE; |