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/geometry/intern/mesh_merge_by_distance.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/geometry/intern/mesh_merge_by_distance.cc')
-rw-r--r-- | source/blender/geometry/intern/mesh_merge_by_distance.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/geometry/intern/mesh_merge_by_distance.cc b/source/blender/geometry/intern/mesh_merge_by_distance.cc index d7c35a4fcc1..55d757d0e81 100644 --- a/source/blender/geometry/intern/mesh_merge_by_distance.cc +++ b/source/blender/geometry/intern/mesh_merge_by_distance.cc @@ -21,11 +21,11 @@ namespace blender::geometry { /* Indicates when the element was not computed. */ -#define OUT_OF_CONTEXT (int)(-1) +#define OUT_OF_CONTEXT int(-1) /* Indicates if the edge or face will be collapsed. */ -#define ELEM_COLLAPSED (int)(-2) +#define ELEM_COLLAPSED int(-2) /* indicates whether an edge or vertex in groups_map will be merged. */ -#define ELEM_MERGED (int)(-2) +#define ELEM_MERGED int(-2) /* Used to indicate a range in an array specifying a group. */ struct WeldGroup { @@ -702,7 +702,7 @@ static bool weld_iter_loop_of_poly_next(WeldLoopOfPolyIter &iter) else { const MLoop &ml = iter.mloop[l]; #ifdef USE_WELD_DEBUG - BLI_assert((uint)iter.v != ml.v); + BLI_assert(uint(iter.v) != ml.v); #endif iter.v = ml.v; iter.e = ml.e; @@ -1311,9 +1311,9 @@ static void customdata_weld( #ifdef USE_WELD_NORMALS mul_v3_fl(no, fac); short *mv_no = mv->no; - mv_no[0] = (short)no[0]; - mv_no[1] = (short)no[1]; - mv_no[2] = (short)no[2]; + mv_no[0] = short(no[0]); + mv_no[1] = short(no[1]); + mv_no[2] = short(no[2]); #endif } else if (type == CD_MEDGE) { @@ -1532,7 +1532,7 @@ static Mesh *create_merged_mesh(const Mesh &mesh, r_i++; } - BLI_assert((int)r_i == result_npolys); + BLI_assert(int(r_i) == result_npolys); BLI_assert(loop_cur == result_nloops); return result; |