mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibWeb: Use Vector::clear_with_capacity() in HTMLTokenizer
This avoids constantly reallocating the Vector<HTMLToken>.
This commit is contained in:
@@ -231,7 +231,7 @@ Optional<HTMLToken> HTMLTokenizer::next_token()
|
||||
{
|
||||
{
|
||||
auto last_position = m_source_positions.last();
|
||||
m_source_positions.clear();
|
||||
m_source_positions.clear_with_capacity();
|
||||
m_source_positions.append(move(last_position));
|
||||
}
|
||||
_StartOfFunction:
|
||||
|
||||
Reference in New Issue
Block a user