diff options
author | B. Stack <bgstack15@gmail.com> | 2022-02-07 00:18:30 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-02-07 00:18:30 +0000 |
commit | 4cba562d787bfc92aeadbbc2ef199d4856523247 (patch) | |
tree | 374c62790fde0ce5514ef56750d0ff023d61b528 /zen/ring_buffer.h | |
parent | Merge branch 'b11.16' into 'master' (diff) | |
parent | add upstream 11.17 (diff) | |
download | FreeFileSync-11.17.tar.gz FreeFileSync-11.17.tar.bz2 FreeFileSync-11.17.zip |
Merge branch 'b11.17' into 'master'11.17
add upstream 11.17
See merge request opensource-tracking/FreeFileSync!41
Diffstat (limited to 'zen/ring_buffer.h')
-rw-r--r-- | zen/ring_buffer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zen/ring_buffer.h b/zen/ring_buffer.h index ae2377d8..dfbb6493 100644 --- a/zen/ring_buffer.h +++ b/zen/ring_buffer.h @@ -182,6 +182,7 @@ public: Iterator(Container& container, size_t offset) : container_(&container), offset_(offset) {} Iterator& operator++() { ++offset_; return *this; } + Iterator& operator--() { --offset_; return *this; } 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 ptrdiff_t operator-(const Iterator& lhs, const Iterator& rhs) { return lhs.offset_ - rhs.offset_; } @@ -226,7 +227,7 @@ private: static T* uninitializedMoveIfNoexcept(T* first, T* last, T* firstTrg, std::true_type ) { return std::uninitialized_move(first, last, firstTrg); } static T* uninitializedMoveIfNoexcept(T* first, T* last, T* firstTrg, std::false_type) { return std::uninitialized_copy(first, last, firstTrg); } //throw ? - void checkInvariants() + void checkInvariants() const { assert(bufStart_ == 0 || bufStart_ < capacity_); assert(size_ <= capacity_); |