From af4d993a30cfde6df322fb58600b25faef424489 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 16 Sep 2022 18:38:12 -0400 Subject: Avoid repeating types in return statements --- .clang-tidy | 1 - include/chilbert/SmallBitVec.hpp | 13 ++++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 38a5674..de1d754 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -28,7 +28,6 @@ Checks: > -hicpp-explicit-conversions, -llvm-header-guard, -llvmlibc-*, - -modernize-return-braced-init-list, -modernize-use-bool-literals, -modernize-use-trailing-return-type, -readability-avoid-const-params-in-decls, diff --git a/include/chilbert/SmallBitVec.hpp b/include/chilbert/SmallBitVec.hpp index b1fe474..10668ac 100644 --- a/include/chilbert/SmallBitVec.hpp +++ b/include/chilbert/SmallBitVec.hpp @@ -330,16 +330,11 @@ public: return Mask{i}; } - iterator begin(const size_t i = 0) { return iterator(*this, i); } + iterator begin(const size_t i = 0) { return {*this, i}; } + iterator end() { return {*this, size()}; } - iterator end() { return iterator(*this, size()); } - - const_iterator begin(const size_t i = 0) const - { - return const_iterator(*this, i); - } - - const_iterator end() const { return const_iterator(*this, size()); } + const_iterator begin(const size_t i = 0) const { return {*this, i}; } + const_iterator end() const { return {*this, size()}; } private: static_assert(8 * sizeof(Rack) == bits_per_rack, ""); -- cgit v1.2.1