1
Fork 0
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:
Drew Stratford 2019-10-17 01:29:06 +13:00 committed by Andreas Kling
parent f11c85f4a7
commit 67041f3a8c
2 changed files with 25 additions and 1 deletions

View file

@ -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 };