Add Vector::take_first().

This commit is contained in:
Andreas Kling 2019-01-14 02:49:30 +01:00
parent 973ff14180
commit 11331e9639

View file

@ -146,6 +146,14 @@ public:
return value;
}
T take_first()
{
ASSERT(!is_empty());
T value = move(first());
remove(0);
return value;
}
void remove(size_t index)
{
m_impl->remove(index);