LibGfx: Elide predictable reallocations in GIF loader

This commit is contained in:
Ben Wiederhake 2021-05-30 19:31:32 +02:00 committed by Andreas Kling
parent 90971673c7
commit 39c09cec88

View file

@ -228,9 +228,9 @@ public:
private:
void init_code_table()
{
m_code_table.clear();
m_code_table.ensure_capacity(m_table_capacity);
for (u16 i = 0; i < m_table_capacity; ++i) {
m_code_table.append({ (u8)i });
m_code_table.unchecked_append({ (u8)i });
}
m_original_code_table = m_code_table;
}