mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:55:08 +00:00
LibWeb: Use Vector::clear_with_capacity() in HTMLTokenizer
This avoids constantly reallocating the Vector<HTMLToken>.
This commit is contained in:
parent
2dd3b54827
commit
25504f6a1b
1 changed files with 1 additions and 1 deletions
|
@ -231,7 +231,7 @@ Optional<HTMLToken> HTMLTokenizer::next_token()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
auto last_position = m_source_positions.last();
|
auto last_position = m_source_positions.last();
|
||||||
m_source_positions.clear();
|
m_source_positions.clear_with_capacity();
|
||||||
m_source_positions.append(move(last_position));
|
m_source_positions.append(move(last_position));
|
||||||
}
|
}
|
||||||
_StartOfFunction:
|
_StartOfFunction:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue