LibGfx: Use Vector::extend() to extend fonts in FontCascadeList

This only grows the capacity once, if required.
This commit is contained in:
Jelle Raaijmakers 2025-06-17 12:32:31 +02:00 committed by Alexander Kalenik
parent 4a514020e0
commit e80914a399

View File

@ -20,9 +20,7 @@ void FontCascadeList::add(NonnullRefPtr<Font const> font, Vector<UnicodeRange> u
void FontCascadeList::extend(FontCascadeList const& other)
{
for (auto const& font : other.m_fonts) {
m_fonts.append({ font.font, font.unicode_ranges });
}
m_fonts.extend(other.m_fonts);
}
Gfx::Font const& FontCascadeList::font_for_code_point(u32 code_point) const