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 --- include/chilbert/SmallBitVec.hpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'include') 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