mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +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
Notes:
sideshowbarker
2024-07-19 07:15:07 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/74f3263ceae Pull-request: https://github.com/SerenityOS/serenity/pull/1978
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; }
|
||||
bool is_end() const { return !m_node; }
|
||||
bool is_begin() const { return !m_prev; }
|
||||
|
||||
private:
|
||||
friend ListType;
|
||||
|
|
Loading…
Reference in a new issue