diff options
Diffstat (limited to 'source/blender/blenlib/intern/mesh_intersect.cc')
-rw-r--r-- | source/blender/blenlib/intern/mesh_intersect.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc index 785e405b482..4eff3c52e63 100644 --- a/source/blender/blenlib/intern/mesh_intersect.cc +++ b/source/blender/blenlib/intern/mesh_intersect.cc @@ -24,6 +24,7 @@ # include <algorithm> # include <fstream> # include <iostream> +# include <memory> # include "BLI_allocator.hh" # include "BLI_array.hh" @@ -520,7 +521,7 @@ class IMeshArena::IMeshArenaImpl : NonCopyable, NonMovable { IMeshArena::IMeshArena() { - pimpl_ = std::unique_ptr<IMeshArenaImpl>(new IMeshArenaImpl()); + pimpl_ = std::make_unique<IMeshArenaImpl>(); } IMeshArena::~IMeshArena() @@ -695,7 +696,7 @@ void IMesh::remove_null_faces() { int64_t nullcount = 0; for (Face *f : this->face_) { - if (f == NULL) { + if (f == nullptr) { ++nullcount; } } @@ -2054,12 +2055,12 @@ class TriOverlaps { if (two_trees_no_self) { BLI_bvhtree_balance(tree_b_); /* Don't expect a lot of trivial intersects in this case. */ - overlap_ = BLI_bvhtree_overlap(tree_, tree_b_, &overlap_tot_, NULL, NULL); + overlap_ = BLI_bvhtree_overlap(tree_, tree_b_, &overlap_tot_, nullptr, nullptr); } else { CBData cbdata{tm, shape_fn, nshapes, use_self}; if (nshapes == 1) { - overlap_ = BLI_bvhtree_overlap(tree_, tree_, &overlap_tot_, NULL, NULL); + overlap_ = BLI_bvhtree_overlap(tree_, tree_, &overlap_tot_, nullptr, nullptr); } else { overlap_ = BLI_bvhtree_overlap( @@ -2231,8 +2232,7 @@ struct SubdivideTrisData { tm(tm), itt_map(itt_map), overlap(overlap), - arena(arena), - overlap_tri_range{} + arena(arena) { } }; @@ -2365,7 +2365,7 @@ static CDT_data calc_cluster_subdivided(const CoplanarClusterInfo &clinfo, std::pair<int, int> key = canon_int_pair(t, t_other); if (itt_map.contains(key)) { ITT_value itt = itt_map.lookup(key); - if (itt.kind != INONE && itt.kind != ICOPLANAR) { + if (!ELEM(itt.kind, INONE, ICOPLANAR)) { itts.append(itt); if (dbg_level > 0) { std::cout << " itt = " << itt << "\n"; |