mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
AK: Add Queue::tail()
We already had head(), so let's also have tail().
This commit is contained in:
parent
479e269c8b
commit
f8c075f2b1
Notes:
sideshowbarker
2024-07-17 00:27:16 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f8c075f2b1
@ -62,6 +62,12 @@ public:
|
||||
return m_segments.first()->data[m_index_into_first];
|
||||
}
|
||||
|
||||
T& tail()
|
||||
{
|
||||
VERIFY(!is_empty());
|
||||
return m_segments.last()->data.last();
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
while (auto* segment = m_segments.take_first())
|
||||
|
Loading…
Reference in New Issue
Block a user