diff options
Diffstat (limited to 'zen/ring_buffer.h')
-rw-r--r-- | zen/ring_buffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zen/ring_buffer.h b/zen/ring_buffer.h index e3dbd55f..8cce8e80 100644 --- a/zen/ring_buffer.h +++ b/zen/ring_buffer.h @@ -182,7 +182,7 @@ public: Iterator(Container& container, size_t offset) : container_(&container), offset_(offset) {} Iterator& operator++() { ++offset_; return *this; } - Iterator& operator+=(ptrdiff_t offset) { offset_ += offset; } + Iterator& operator+=(ptrdiff_t offset) { offset_ += offset; return *this; } inline friend bool operator==(const Iterator& lhs, const Iterator& rhs) { assert(lhs.container_ == rhs.container_); return lhs.offset_ == rhs.offset_; } inline friend bool operator!=(const Iterator& lhs, const Iterator& rhs) { return !(lhs == rhs); } inline friend ptrdiff_t operator-(const Iterator& lhs, const Iterator& rhs) { return lhs.offset_ - rhs.offset_; } |