mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:47:35 +00:00
AK: Calculate CircularQueue::end() correctly
Previously end() was only correct when m_head == 0.
This commit is contained in:
parent
3b7d8ed6a5
commit
c515121844
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ public:
|
|||
};
|
||||
|
||||
ConstIterator begin() const { return ConstIterator(*this, m_head); }
|
||||
ConstIterator end() const { return ConstIterator(*this, size()); }
|
||||
ConstIterator end() const { return ConstIterator(*this, (m_head + size()) % Capacity); }
|
||||
|
||||
size_t head_index() const { return m_head; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue