mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +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
Notes:
sideshowbarker
2024-07-18 03:00:48 +09:00
Author: https://github.com/petelliott Commit: https://github.com/SerenityOS/serenity/commit/c5151218448 Pull-request: https://github.com/SerenityOS/serenity/pull/10374
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
Reference in a new issue