Cleanup: fix some clang tidy issues

This commit is contained in:
Jacques Lucke 2020-11-09 12:05:07 +01:00
parent 5837ffc143
commit 525a042c5c
3 changed files with 8 additions and 12 deletions

View File

@ -519,7 +519,7 @@ class IMeshArena::IMeshArenaImpl : NonCopyable, NonMovable {
IMeshArena::IMeshArena()
{
pimpl_ = std::unique_ptr<IMeshArenaImpl>(new IMeshArenaImpl());
pimpl_ = std::make_unique<IMeshArenaImpl>();
}
IMeshArena::~IMeshArena()
@ -2022,12 +2022,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(
@ -2199,8 +2199,7 @@ struct SubdivideTrisData {
tm(tm),
itt_map(itt_map),
overlap(overlap),
arena(arena),
overlap_tri_range{}
arena(arena)
{
}
};

View File

@ -119,7 +119,8 @@ static bool bmvert_attached_to_wire(const BMVert *bmv)
static bool bmvert_attached_to_hidden_face(BMVert *bmv)
{
BMIter iter;
for (BMFace *bmf = static_cast<BMFace *>(BM_iter_new(&iter, NULL, BM_FACES_OF_VERT, bmv)); bmf;
for (BMFace *bmf = static_cast<BMFace *>(BM_iter_new(&iter, nullptr, BM_FACES_OF_VERT, bmv));
bmf;
bmf = static_cast<BMFace *>(BM_iter_step(&iter))) {
if (BM_elem_flag_test(bmf, BM_ELEM_HIDDEN)) {
return true;

View File

@ -25,9 +25,7 @@
#include "testing/testing.h"
namespace blender {
namespace deg {
namespace tests {
namespace blender::deg::tests {
class TestableRNANodeQuery : public RNANodeQuery {
public:
@ -55,6 +53,4 @@ TEST(deg_builder_rna, contains)
EXPECT_FALSE(TestableRNANodeQuery::contains("pose.bone[\"location\"].scale[0]", "location"));
}
} // namespace tests
} // namespace deg
} // namespace blender
} // namespace blender::deg::tests