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/sculpt_paint/curves_sculpt_density.cc')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_density.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_density.cc b/source/blender/editors/sculpt_paint/curves_sculpt_density.cc
index a37eb4bb560..78e2d55e6b9 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_density.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_density.cc
@@ -132,8 +132,7 @@ struct DensityAddOperationExecutor {
BKE_bvhtree_from_mesh_get(&surface_bvh_eval_, surface_eval_, BVHTREE_FROM_LOOPTRI, 2);
BLI_SCOPED_DEFER([&]() { free_bvhtree_from_mesh(&surface_bvh_eval_); });
- surface_looptris_eval_ = {BKE_mesh_runtime_looptri_ensure(surface_eval_),
- BKE_mesh_runtime_looptri_len(surface_eval_)};
+ surface_looptris_eval_ = surface_eval_->looptris();
/* Find UV map. */
VArraySpan<float2> surface_uv_map;
if (curves_id_orig_->surface_uv_map != nullptr) {
@@ -235,7 +234,7 @@ struct DensityAddOperationExecutor {
new_roots_kdtree,
root_pos_cu,
brush_settings_->minimum_distance,
- [&](const int other_new_i, const float *UNUSED(co), float UNUSED(dist_sq)) {
+ [&](const int other_new_i, const float * /*co*/, float /*dist_sq*/) {
if (other_new_i == -1) {
new_curve_skipped[new_i] = true;
return false;
@@ -265,8 +264,7 @@ struct DensityAddOperationExecutor {
reinterpret_cast<const float3 *>(CustomData_get_layer(&surface_orig_->ldata, CD_NORMAL)),
surface_orig_->totloop};
- const Span<MLoopTri> surface_looptris_orig = {BKE_mesh_runtime_looptri_ensure(surface_orig_),
- BKE_mesh_runtime_looptri_len(surface_orig_)};
+ const Span<MLoopTri> surface_looptris_orig = surface_orig_->looptris();
const geometry::ReverseUVSampler reverse_uv_sampler{surface_uv_map, surface_looptris_orig};
geometry::AddCurvesOnMeshInputs add_inputs;
@@ -417,7 +415,7 @@ struct DensityAddOperationExecutor {
*surface_bvh_eval_.tree,
brush_pos_su,
brush_radius_su,
- [&](const int index, const float3 &UNUSED(co), const float UNUSED(dist_sq)) {
+ [&](const int index, const float3 & /*co*/, const float /*dist_sq*/) {
selected_looptri_indices.append(index);
});
@@ -644,7 +642,7 @@ struct DensitySubtractOperationExecutor {
* strength. */
Array<bool> allow_remove_curve(curves_->curves_num(), false);
threading::parallel_for(curves_->curves_range(), 512, [&](const IndexRange range) {
- RandomNumberGenerator rng((int)(PIL_check_seconds_timer() * 1000000.0));
+ RandomNumberGenerator rng(int(PIL_check_seconds_timer() * 1000000.0));
for (const int curve_i : range) {
if (curves_to_delete[curve_i]) {
@@ -689,7 +687,7 @@ struct DensitySubtractOperationExecutor {
root_points_kdtree_,
orig_pos_cu,
minimum_distance_,
- [&](const int other_curve_i, const float *UNUSED(co), float UNUSED(dist_sq)) {
+ [&](const int other_curve_i, const float * /*co*/, float /*dist_sq*/) {
if (other_curve_i == curve_i) {
return true;
}
@@ -733,7 +731,7 @@ struct DensitySubtractOperationExecutor {
* strength. */
Array<bool> allow_remove_curve(curves_->curves_num(), false);
threading::parallel_for(curves_->curves_range(), 512, [&](const IndexRange range) {
- RandomNumberGenerator rng((int)(PIL_check_seconds_timer() * 1000000.0));
+ RandomNumberGenerator rng(int(PIL_check_seconds_timer() * 1000000.0));
for (const int curve_i : range) {
if (curves_to_delete[curve_i]) {
@@ -774,7 +772,7 @@ struct DensitySubtractOperationExecutor {
root_points_kdtree_,
pos_cu,
minimum_distance_,
- [&](const int other_curve_i, const float *UNUSED(co), float UNUSED(dist_sq)) {
+ [&](const int other_curve_i, const float * /*co*/, float /*dist_sq*/) {
if (other_curve_i == curve_i) {
return true;
}