aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-09-16 17:36:30 -0400
committerDavid Robillard <d@drobilla.net>2022-09-16 22:31:06 -0400
commitd4584ffcc12df81a1b6e002233350a7850f84895 (patch)
treebe21dc3c51514ae9401ee3f7715ea5841286289a
parent8697e134aeac0318e6686d785113f0763cbc3c1c (diff)
downloadchilbert-d4584ffcc12df81a1b6e002233350a7850f84895.tar.gz
chilbert-d4584ffcc12df81a1b6e002233350a7850f84895.tar.bz2
chilbert-d4584ffcc12df81a1b6e002233350a7850f84895.zip
Fix incorrect use of std::move
-rw-r--r--.clang-tidy1
-rw-r--r--include/chilbert/chilbert.ipp10
2 files changed, 5 insertions, 6 deletions
diff --git a/.clang-tidy b/.clang-tidy
index a941ce1..f2608a1 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -12,7 +12,6 @@ Checks: >
-*-use-auto,
-altera-*,
-bugprone-easily-swappable-parameters,
- -bugprone-move-forwarding-reference,
-cert-oop54-cpp,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-owning-memory,
diff --git a/include/chilbert/chilbert.ipp b/include/chilbert/chilbert.ipp
index 7a5b9b7..0b6587a 100644
--- a/include/chilbert/chilbert.ipp
+++ b/include/chilbert/chilbert.ipp
@@ -209,7 +209,7 @@ coords_to_index(const P& p,
I&& scratch,
size_t* const ds = nullptr)
{
- I e{std::move(scratch)};
+ I e{std::forward<I>(scratch)};
I l{e};
I t{e};
I w{e};
@@ -255,7 +255,7 @@ template <class P, class H, class I>
inline void
index_to_coords(P& p, const size_t m, const size_t n, const H& h, I&& scratch)
{
- I e{std::move(scratch)};
+ I e{std::forward<I>(scratch)};
I l{e};
I t{e};
I w{e};
@@ -327,12 +327,12 @@ coords_to_compact_index(const P& p,
if (mn > SmallBitVec::bits_per_rack) {
DynamicBitVec h(mn);
detail::coords_to_index<P, DynamicBitVec, I>(
- p, m, n, h, std::move(scratch), ds);
+ p, m, n, h, std::forward<I>(scratch), ds);
compact_index<DynamicBitVec, HC>(ms, ds, n, m, h, hc);
} else {
SmallBitVec h(mn);
detail::coords_to_index<P, SmallBitVec, I>(
- p, m, n, h, std::move(scratch), ds);
+ p, m, n, h, std::forward<I>(scratch), ds);
compact_index<SmallBitVec, HC>(ms, ds, n, m, h, hc);
}
@@ -349,7 +349,7 @@ compact_index_to_coords(P& p,
size_t M,
size_t m)
{
- I e{std::move(scratch)};
+ I e{std::forward<I>(scratch)};
I l{e};
I t{e};
I w{e};