[vector] Optimize grow_vector() for size
Again, compiler is smarter than I am.
This commit is contained in:
parent
d36f688131
commit
1dd9396c7a
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue