diff options
author | David Robillard <d@drobilla.net> | 2022-09-16 18:38:12 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-09-16 22:31:06 -0400 |
commit | af4d993a30cfde6df322fb58600b25faef424489 (patch) | |
tree | 706283d11880b666cf157fe9c7705d0c048748b4 | |
parent | b94a7282ecbde37c2b88fd8327a409cebe046b30 (diff) | |
download | chilbert-af4d993a30cfde6df322fb58600b25faef424489.tar.gz chilbert-af4d993a30cfde6df322fb58600b25faef424489.tar.bz2 chilbert-af4d993a30cfde6df322fb58600b25faef424489.zip |
Avoid repeating types in return statements
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | 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, ""); |