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:33:28 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 13:17:08 +0300
commitf68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch)
tree2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/editors/sculpt_paint/paint_vertex.cc
parentc7b247a118e302a3afc6473797e53b6af28b69e2 (diff)
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.cc')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc
index c6eefb0b50e..03925b5ebc3 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex.cc
@@ -171,8 +171,8 @@ static void view_angle_limits_init(NormalAnglePrecalc *a, float angle, bool do_m
a->angle_inner = a->angle = angle;
}
- a->angle_inner *= (float)(M_PI_2 / 90);
- a->angle *= (float)(M_PI_2 / 90);
+ a->angle_inner *= float(M_PI_2 / 90);
+ a->angle *= float(M_PI_2 / 90);
a->angle_range = a->angle - a->angle_inner;
if (a->angle_range <= 0.0f) {
@@ -894,7 +894,7 @@ static void do_weight_paint_vertex_single(
else {
/* dv and dv_mirr are the same */
int totweight_prev = dv_mirr->totweight;
- int dw_offset = (int)(dw - dv_mirr->dw);
+ int dw_offset = int(dw - dv_mirr->dw);
dw_mirr = BKE_defvert_ensure_index(dv_mirr, vgroup_mirr);
/* if we added another, get our old one back */
@@ -2128,7 +2128,7 @@ static void do_wpaint_brush_smear_task_cb_ex(void *__restrict userdata,
}
do_weight_paint_vertex(
- data->vp, data->ob, data->wpi, v_index, final_alpha, (float)weight_final);
+ data->vp, data->ob, data->wpi, v_index, final_alpha, float(weight_final));
}
}
}
@@ -2282,7 +2282,7 @@ static void calculate_average_weight(SculptThreadedTaskData *data,
}
if (accum_len != 0) {
accum_weight /= accum_len;
- data->strength = (float)accum_weight;
+ data->strength = float(accum_weight);
}
MEM_SAFE_FREE(data->custom_data); /* 'accum' */