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/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc')
-rw-r--r-- | source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc index d6c246c51a9..32a262e4533 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc @@ -71,7 +71,7 @@ BLI_INLINE void lines_adjacency_triangle( if (!value_is_init || v_data == NO_EDGE) { /* Save the winding order inside the sign bit. Because the * Edge-hash sort the keys and we need to compare winding later. */ - int value = (int)l1 + 1; /* 0 cannot be signed so add one. */ + int value = int(l1) + 1; /* 0 cannot be signed so add one. */ *pval = POINTER_FROM_INT((inv_indices) ? -value : value); /* Store loop indices for remaining non-manifold edges. */ data->vert_to_loop[v2] = l2; @@ -81,7 +81,7 @@ BLI_INLINE void lines_adjacency_triangle( /* HACK Tag as not used. Prevent overhead of BLI_edgehash_remove. */ *pval = POINTER_FROM_INT(NO_EDGE); bool inv_opposite = (v_data < 0); - uint l_opposite = (uint)abs(v_data) - 1; + uint l_opposite = uint(abs(v_data)) - 1; /* TODO: Make this part thread-safe. */ if (inv_opposite == inv_indices) { /* Don't share edge if triangles have non matching winding. */ @@ -146,7 +146,7 @@ static void extract_lines_adjacency_finish(const MeshRenderData *UNUSED(mr), int v_data = POINTER_AS_INT(BLI_edgehashIterator_getValue(ehi)); if (v_data != NO_EDGE) { BLI_edgehashIterator_getKey(ehi, &v2, &v3); - l1 = (uint)abs(v_data) - 1; + l1 = uint(abs(v_data)) - 1; if (v_data < 0) { /* `inv_opposite`. */ SWAP(uint, v2, v3); } |