From: Ilya Dryomov Date: Sat, 6 Jan 2024 11:22:35 +0000 (+0100) Subject: common/bit_vector: fix IteratorImpl post-increment operator X-Git-Tag: v16.2.15~27^2~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3b90236b7bdfb81490dec1fa265c3cd96c2c7891;p=ceph.git common/bit_vector: fix IteratorImpl post-increment operator It's totally broken: instead of returning the current position and moving to the next position, it returns the next position and doesn't move anywhere. Luckily it hasn't been used until now. Signed-off-by: Ilya Dryomov (cherry picked from commit 2ab5b52f71c88cb55f8ed82f1dfd0115fdd6e022) --- diff --git a/src/common/bit_vector.hpp b/src/common/bit_vector.hpp index 9ce3e8b1ebb23..09ac98b32c3bb 100644 --- a/src/common/bit_vector.hpp +++ b/src/common/bit_vector.hpp @@ -129,7 +129,7 @@ public: inline IteratorImpl operator++(int) { IteratorImpl iterator_impl(*this); - ++iterator_impl; + ++*this; return iterator_impl; } inline IteratorImpl operator+(uint64_t offset) {