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:
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editface.cc6
-rw-r--r--source/blender/editors/mesh/mesh_data.cc4
-rw-r--r--source/blender/editors/mesh/meshtools.cc8
3 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/mesh/editface.cc b/source/blender/editors/mesh/editface.cc
index ac8dd87bed6..888a8340d51 100644
--- a/source/blender/editors/mesh/editface.cc
+++ b/source/blender/editors/mesh/editface.cc
@@ -230,7 +230,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const uint index, const bo
bke::SpanAttributeWriter<bool> select_poly = attributes.lookup_or_add_for_write_span<bool>(
".select_poly", ATTR_DOMAIN_FACE);
- if (index != (uint)-1) {
+ if (index != uint(-1)) {
/* only put face under cursor in array */
const MPoly &poly = polys[index];
BKE_mesh_poly_edgebitmap_insert(edge_tag, &poly, &loops[poly.loopstart]);
@@ -295,7 +295,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const uint index, const bo
void paintface_select_linked(bContext *C, Object *ob, const int mval[2], const bool select)
{
- uint index = (uint)-1;
+ uint index = uint(-1);
Mesh *me = BKE_mesh_from_object(ob);
if (me == nullptr || me->totpoly == 0) {
@@ -451,7 +451,7 @@ bool paintface_mouse_select(bContext *C,
}
if (found) {
- me->act_face = (int)index;
+ me->act_face = int(index);
switch (params->sel_op) {
case SEL_OP_SET:
diff --git a/source/blender/editors/mesh/mesh_data.cc b/source/blender/editors/mesh/mesh_data.cc
index dc3389844b8..ea03117a525 100644
--- a/source/blender/editors/mesh/mesh_data.cc
+++ b/source/blender/editors/mesh/mesh_data.cc
@@ -161,9 +161,9 @@ static void mesh_uv_reset_array(float **fuv, const int len)
/* Make sure we ignore 2-sided faces. */
}
else if (len > 2) {
- float fac = 0.0f, dfac = 1.0f / (float)len;
+ float fac = 0.0f, dfac = 1.0f / float(len);
- dfac *= (float)M_PI * 2.0f;
+ dfac *= float(M_PI) * 2.0f;
for (int i = 0; i < len; i++) {
fuv[i][0] = 0.5f * sinf(fac) + 0.5f;
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};