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/editors/sculpt_paint
parent891949cbb47143420f4324cb60efc05ef5d70b39 (diff)
Cleanup: replace static_casts with functional casts for numeric types
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_ops.cc2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
index 423fd70e1e2..ee12afeb506 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
@@ -344,7 +344,7 @@ static int select_random_exec(bContext *C, wmOperator *op)
VectorSet<Curves *> unique_curves = curves::get_unique_editable_curves(*C);
const int seed = RNA_int_get(op->ptr, "seed");
- RandomNumberGenerator rng{static_cast<uint32_t>(seed)};
+ RandomNumberGenerator rng{uint32_t(seed)};
const bool partial = RNA_boolean_get(op->ptr, "partial");
const bool constant_per_curve = RNA_boolean_get(op->ptr, "constant_per_curve");
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc b/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc
index dc45a7ec51c..d3c61508726 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc
+++ b/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc
@@ -70,11 +70,11 @@ static void update_curve_mask(CurveMaskCache *curve_mask_cache,
for (int y = 0; y < diameter; y++) {
for (int x = 0; x < diameter; x++, m++) {
float pixel_xy[2];
- pixel_xy[0] = static_cast<float>(x) + aa_offset;
+ pixel_xy[0] = float(x) + aa_offset;
float total_weight = 0;
for (int i = 0; i < aa_samples; i++) {
- pixel_xy[1] = static_cast<float>(y) + aa_offset;
+ pixel_xy[1] = float(y) + aa_offset;
for (int j = 0; j < aa_samples; j++) {
const float len = len_v2v2(pixel_xy, bpos);
const int sample_index = min_ii((len / clamped_radius) * CurveSamplesBaseLen,