AK: Add CircularQueue::at().

This commit is contained in:
Andreas Kling 2019-03-15 12:13:51 +01:00
parent 5dfdcf796d
commit f87dec1cbf
Notes: sideshowbarker 2024-07-19 15:03:02 +09:00

View file

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