From ba89f6d33b126e30278ba81e283668186e50b505 Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Sun, 24 Nov 2024 17:18:47 -0800 Subject: [PATCH] Removing some explicit `NOLINT` --- stlab/forest.hpp | 6 ++---- stlab/forest_algorithms.hpp | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/stlab/forest.hpp b/stlab/forest.hpp index 5bd8a9f2..c3c2b4ae 100644 --- a/stlab/forest.hpp +++ b/stlab/forest.hpp @@ -106,8 +106,7 @@ struct child_iterator { using iterator_category = typename std::iterator_traits::iterator_category; child_iterator() = default; - // NOLINTNEXTLINE(performance-unnecessary-value-param) - explicit child_iterator(I x) : _x(std::move(x)) {} + explicit child_iterator(const I& x) : _x(std::move(x)) {} template child_iterator(const child_iterator& u) : _x(u.base()) {} @@ -183,8 +182,7 @@ struct edge_iterator { using iterator_category = typename std::iterator_traits::iterator_category; edge_iterator() = default; - // NOLINTNEXTLINE(performance-unnecessary-value-param) - explicit edge_iterator(I x) : _x(find_edge(x, Edge)) {} + explicit edge_iterator(const I& x) : _x(find_edge(x, Edge)) {} template edge_iterator(const edge_iterator& u) : _x(u.base()) {} diff --git a/stlab/forest_algorithms.hpp b/stlab/forest_algorithms.hpp index 6ad9fbe4..9ec98378 100644 --- a/stlab/forest_algorithms.hpp +++ b/stlab/forest_algorithms.hpp @@ -40,8 +40,7 @@ struct transcribe_iterator { using reference = void; using container_type = Container; - // NOLINTNEXTLINE(performance-unnecessary-value-param) - transcribe_iterator(Container& c, typename Container::iterator i) : _c{&c}, _i{std::move(i)} {} + transcribe_iterator(Container& c, const typename Container::iterator& i) : _c{&c}, _i{i} {} constexpr auto operator*() -> auto& { return *this; } constexpr auto operator++() -> auto& {