diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:33:28 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 13:17:08 +0300 |
commit | f68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch) | |
tree | 2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/editors/mesh/meshtools.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/editors/mesh/meshtools.cc')
-rw-r--r-- | source/blender/editors/mesh/meshtools.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/meshtools.cc b/source/blender/editors/mesh/meshtools.cc index 93754e2ef87..917e019c05a 100644 --- a/source/blender/editors/mesh/meshtools.cc +++ b/source/blender/editors/mesh/meshtools.cc @@ -1210,7 +1210,7 @@ bool ED_mesh_pick_face(bContext *C, Object *ob, const int mval[2], uint dist_px, *r_index = DRW_select_buffer_sample_point(vc.depsgraph, vc.region, vc.v3d, mval); } - if ((*r_index) == 0 || (*r_index) > (uint)me->totpoly) { + if ((*r_index) == 0 || (*r_index) > uint(me->totpoly)) { return false; } @@ -1267,7 +1267,7 @@ bool ED_mesh_pick_face_vert( int v_idx_best = ORIGINDEX_NONE; /* find the vert closest to 'mval' */ - const float mval_f[2] = {(float)mval[0], (float)mval[1]}; + const float mval_f[2] = {float(mval[0]), float(mval[1])}; float len_best = FLT_MAX; const Span<MVert> verts = me_eval->verts(); @@ -1379,7 +1379,7 @@ bool ED_mesh_pick_vert( *r_index = DRW_select_buffer_sample_point(vc.depsgraph, vc.region, vc.v3d, mval); } - if ((*r_index) == 0 || (*r_index) > (uint)me->totvert) { + if ((*r_index) == 0 || (*r_index) > uint(me->totvert)) { return false; } @@ -1395,7 +1395,7 @@ bool ED_mesh_pick_vert( RegionView3D *rv3d = static_cast<RegionView3D *>(region->regiondata); /* find the vert closest to 'mval' */ - const float mval_f[2] = {(float)mval[0], (float)mval[1]}; + const float mval_f[2] = {float(mval[0]), float(mval[1])}; VertPickData data = {nullptr}; |