code cleanup
[blender.git] / source / blender / editors / space_view3d / view3d_select.c
index d8e394ab68c78a23be0e281c0b0ae72aa7c7ad2c..df0908e445e272c48e2ccd37dc2b906b600af665 100644 (file)
@@ -119,8 +119,8 @@ int view3d_get_view_aligned_coordinate(ViewContext *vc, float fp[3], const int m
        initgrabz(vc->rv3d, fp[0], fp[1], fp[2]);
 
        if (mval_cpy[0] != IS_CLIPPED) {
-               float mval_f[2];
-               VECSUB2D(mval_f, mval_cpy, mval);
+               const float mval_f[2] = {(float)(mval_cpy[0] - mval[0]),
+                                        (float)(mval_cpy[1] - mval[1])};
                ED_view3d_win_to_delta(vc->ar, mval_f, dvec);
                sub_v3_v3(fp, dvec);