Add an InlineLinkedList::containsSlow(T*) helper.

This commit is contained in:
Andreas Kling 2018-10-21 23:48:27 +02:00
parent a89bebfda4
commit e38f40a83c
Notes: sideshowbarker 2024-07-19 18:45:49 +09:00

View file

@ -58,6 +58,15 @@ public:
void remove(T*);
void append(InlineLinkedList<T>&);
bool containsSlow(T* value) const
{
for (T* node = m_head; node; node = node->next()) {
if (node == value)
return true;
}
return false;
}
private:
T* m_head { nullptr };
T* m_tail { nullptr };