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:
authorHans Goudey <h.goudey@me.com>2022-04-06 00:40:28 +0300
committerHans Goudey <h.goudey@me.com>2022-04-06 00:40:44 +0300
commitbb7e3c2b563f752c0bc76631fd2804768c6d3847 (patch)
tree0b4ee9cd402d888ae56c8c48f27b2f05180b7278 /source/blender/blenkernel/intern/geometry_set.cc
parent228f7f1c850897cac85b2c4b42cf9052976b7be1 (diff)
Cleanup: Simplify if statements, clang tidy
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_set.cc')
-rw-r--r--source/blender/blenkernel/intern/geometry_set.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/geometry_set.cc b/source/blender/blenkernel/intern/geometry_set.cc
index 0b08acf92a3..fc758e12c70 100644
--- a/source/blender/blenkernel/intern/geometry_set.cc
+++ b/source/blender/blenkernel/intern/geometry_set.cc
@@ -176,20 +176,16 @@ Vector<const GeometryComponent *> GeometrySet::get_components_for_read() const
bool GeometrySet::compute_boundbox_without_instances(float3 *r_min, float3 *r_max) const
{
bool have_minmax = false;
- const PointCloud *pointcloud = this->get_pointcloud_for_read();
- if (pointcloud != nullptr) {
+ if (const PointCloud *pointcloud = this->get_pointcloud_for_read()) {
have_minmax |= BKE_pointcloud_minmax(pointcloud, *r_min, *r_max);
}
- const Mesh *mesh = this->get_mesh_for_read();
- if (mesh != nullptr) {
+ if (const Mesh *mesh = this->get_mesh_for_read()) {
have_minmax |= BKE_mesh_wrapper_minmax(mesh, *r_min, *r_max);
}
- const Volume *volume = this->get_volume_for_read();
- if (volume != nullptr) {
+ if (const Volume *volume = this->get_volume_for_read()) {
have_minmax |= BKE_volume_min_max(volume, *r_min, *r_max);
}
- const Curves *curves = this->get_curves_for_read();
- if (curves != nullptr) {
+ if (const Curves *curves = this->get_curves_for_read()) {
std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*curves);
/* Using the evaluated positions is somewhat arbitrary, but it is probably expected. */
have_minmax |= curve->bounds_min_max(*r_min, *r_max, true);