mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
AK: Add SinglyLinkedListIterator::is_begin()
It's useful to be able to tell if we are at the beginning of the list when using the list as a queue.
This commit is contained in:
parent
36c00e8078
commit
74f3263cea
1 changed files with 1 additions and 0 deletions
|
@ -46,6 +46,7 @@ public:
|
||||||
ElementType& operator*() { return m_node->value; }
|
ElementType& operator*() { return m_node->value; }
|
||||||
ElementType* operator->() { return &m_node->value; }
|
ElementType* operator->() { return &m_node->value; }
|
||||||
bool is_end() const { return !m_node; }
|
bool is_end() const { return !m_node; }
|
||||||
|
bool is_begin() const { return !m_prev; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend ListType;
|
friend ListType;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue