xo-arena: bugfix: backwards iteration working now
This commit is contained in:
parent
579a244c8c
commit
6f0b45c429
3 changed files with 84 additions and 1 deletions
|
|
@ -379,6 +379,19 @@ namespace xo {
|
|||
return *this;
|
||||
}
|
||||
|
||||
DArenaHashMapIterator & operator--() {
|
||||
/* simpler than forward iteration, since bookend immediately
|
||||
* precedes control byte for first slot
|
||||
*/
|
||||
do {
|
||||
--ctrl_;
|
||||
--pos_;
|
||||
} while (is_sentinel(*ctrl_)
|
||||
&& (*ctrl_ != c_iterator_bookend));
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
uint8_t * ctrl_ = nullptr;
|
||||
value_type * pos_ = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue