mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +00:00
AK: Add CircularDeque.
This class inherits from CircularQueue and adds the ability dequeue from the end of the queue using dequeue_end(). Note that I had to make some of CircularQueue's fields protected to properly implement dequeue_end.
This commit is contained in:
parent
f11c85f4a7
commit
67041f3a8c
2 changed files with 25 additions and 1 deletions
|
@ -77,7 +77,7 @@ public:
|
|||
|
||||
int head_index() const { return m_head; }
|
||||
|
||||
private:
|
||||
protected:
|
||||
friend class ConstIterator;
|
||||
T m_elements[Capacity];
|
||||
int m_size { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue