[vector] Optimize grow_vector() for size

Again, compiler is smarter than I am.
This commit is contained in:
Behdad Esfahbod 2022-11-18 17:01:14 -07:00
parent d36f688131
commit 1dd9396c7a
1 changed files with 0 additions and 10 deletions

View File

@ -242,16 +242,6 @@ struct hb_vector_t
return new_array; return new_array;
} }
template <typename T = Type,
hb_enable_if (hb_is_trivially_constructible(T))>
void
grow_vector (unsigned size)
{
memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ));
length = size;
}
template <typename T = Type,
hb_enable_if (!hb_is_trivially_constructible(T))>
void void
grow_vector (unsigned size) grow_vector (unsigned size)
{ {