mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Add CircularQueue::at().
This commit is contained in:
parent
5dfdcf796d
commit
f87dec1cbf
Notes:
sideshowbarker
2024-07-19 15:03:02 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f87dec1cbf5
1 changed files with 2 additions and 0 deletions
|
@ -46,6 +46,8 @@ public:
|
|||
return value;
|
||||
}
|
||||
|
||||
const T& at(int index) const { return m_elements[(m_head + index) % Capacity]; }
|
||||
|
||||
class ConstIterator {
|
||||
public:
|
||||
bool operator!=(const ConstIterator& other) { return m_index != other.m_index; }
|
||||
|
|
Loading…
Reference in a new issue