summaryrefslogtreecommitdiff
path: root/zen/ring_buffer.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-02-06 16:41:53 -0500
committerB. Stack <bgstack15@gmail.com>2022-02-06 16:41:53 -0500
commitf6b6d222dc1a79c95f6756c707c5fcc3a785c030 (patch)
tree374c62790fde0ce5514ef56750d0ff023d61b528 /zen/ring_buffer.h
parentadd upstream 11.16 (diff)
downloadFreeFileSync-f6b6d222dc1a79c95f6756c707c5fcc3a785c030.tar.gz
FreeFileSync-f6b6d222dc1a79c95f6756c707c5fcc3a785c030.tar.bz2
FreeFileSync-f6b6d222dc1a79c95f6756c707c5fcc3a785c030.zip
add upstream 11.17
Diffstat (limited to 'zen/ring_buffer.h')
-rw-r--r--zen/ring_buffer.h3
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_);
bgstack15