diff options
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | include/chilbert/chilbert.ipp | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/.clang-tidy b/.clang-tidy index d4f85ba..b47495c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -6,7 +6,6 @@ Checks: > -*-named-parameter, -*-no-malloc, -*-non-private-member-variables-in-classes, - -*-use-auto, -altera-*, -bugprone-easily-swappable-parameters, -cert-oop54-cpp, diff --git a/include/chilbert/chilbert.ipp b/include/chilbert/chilbert.ipp index 0b6587a..db75a62 100644 --- a/include/chilbert/chilbert.ipp +++ b/include/chilbert/chilbert.ipp @@ -222,7 +222,7 @@ coords_to_index(const P& p, // Work from MSB to LSB size_t d = D0; size_t ho = m * n; - for (intptr_t i = static_cast<intptr_t>(m - 1); i >= 0; --i) { + for (auto i = static_cast<intptr_t>(m - 1); i >= 0; --i) { if (ds) { ds[i] = d; } @@ -270,7 +270,7 @@ index_to_coords(P& p, const size_t m, const size_t n, const H& h, I&& scratch) // Work from MSB to LSB size_t d = D0; size_t ho = m * n; - for (intptr_t i = static_cast<intptr_t>(m - 1); i >= 0; --i) { + for (auto i = static_cast<intptr_t>(m - 1); i >= 0; --i) { // Get the Hilbert index bits ho -= n; get_bits<H, I>(h, n, ho, w); @@ -322,7 +322,7 @@ coords_to_compact_index(const P& p, // If we could avoid allocation altogether (ie: have a // fixed buffer allocated on the stack) then this increases // speed by a bit (4% when n=4, m=20) - size_t* const ds = new size_t[m]; + auto* const ds = new size_t[m]; if (mn > SmallBitVec::bits_per_rack) { DynamicBitVec h(mn); @@ -382,7 +382,7 @@ compact_index_to_coords(P& p, // Work from MSB to LSB size_t d = D0; - for (intptr_t i = static_cast<intptr_t>(m - 1); i >= 0; --i) { + for (auto i = static_cast<intptr_t>(m - 1); i >= 0; --i) { // Get the mask and ptrn size_t b = 0; extract_mask<I>(ms, n, d, static_cast<size_t>(i), mask, b); |