Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-25 11:30:50 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 11:31:10 +0300
commitc7b247a118e302a3afc6473797e53b6af28b69e2 (patch)
treed11149a165bfd8f3b3b791f24547499f041b133b /source/blender/bmesh
parent891949cbb47143420f4324cb60efc05ef5d70b39 (diff)
Cleanup: replace static_casts with functional casts for numeric types
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_convert.cc8
-rw-r--r--source/blender/bmesh/tools/bmesh_boolean.cc2
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.cc b/source/blender/bmesh/intern/bmesh_mesh_convert.cc
index 9e3d0b66556..dfbdd64ee7c 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_convert.cc
+++ b/source/blender/bmesh/intern/bmesh_mesh_convert.cc
@@ -1069,10 +1069,10 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh
if (need_material_index) {
BM_mesh_elem_table_ensure(bm, BM_FACE);
- write_fn_to_attribute<int>(
- me->attributes_for_write(), "material_index", ATTR_DOMAIN_FACE, [&](const int i) {
- return static_cast<int>(BM_face_at_index(bm, i)->mat_nr);
- });
+ write_fn_to_attribute<int>(me->attributes_for_write(),
+ "material_index",
+ ATTR_DOMAIN_FACE,
+ [&](const int i) { return int(BM_face_at_index(bm, i)->mat_nr); });
}
/* Patch hook indices and vertex parents. */
diff --git a/source/blender/bmesh/tools/bmesh_boolean.cc b/source/blender/bmesh/tools/bmesh_boolean.cc
index 216c73564c8..50a6812895f 100644
--- a/source/blender/bmesh/tools/bmesh_boolean.cc
+++ b/source/blender/bmesh/tools/bmesh_boolean.cc
@@ -187,7 +187,7 @@ static bool apply_mesh_output_to_bmesh(BMesh *bm, IMesh &m_out, bool keep_hidden
float co[3];
const double3 &d_co = vertp->co;
for (int i = 0; i < 3; ++i) {
- co[i] = static_cast<float>(d_co[i]);
+ co[i] = float(d_co[i]);
}
BMVert *bmv = BM_vert_create(bm, co, nullptr, BM_CREATE_NOP);
new_bmvs[v] = bmv;