mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-16 15:21:56 +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
Notes:
sideshowbarker
2024-07-17 18:32:04 +09:00
Author: https://github.com/awesomekling
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