mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
AK: Make Vector::unstable_remove() return the removed value
...and rename it to unstable_take(), to align with other take...() methods.
This commit is contained in:
parent
63f458ffc1
commit
6111cfda73
4 changed files with 5 additions and 5 deletions
|
@ -310,11 +310,11 @@ public:
|
|||
return value;
|
||||
}
|
||||
|
||||
void unstable_remove(size_t index)
|
||||
T unstable_take(size_t index)
|
||||
{
|
||||
ASSERT(index < m_size);
|
||||
swap(at(index), at(m_size - 1));
|
||||
take_last();
|
||||
return take_last();
|
||||
}
|
||||
|
||||
void remove(size_t index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue