[vector] Minor write more idiomatic

This commit is contained in:
Behdad Esfahbod 2023-06-05 21:38:37 -06:00
parent cd8f7c0201
commit f01ebe97b2

View file

@ -295,11 +295,8 @@ struct hb_vector_t
void
grow_vector (unsigned size)
{
while (length < size)
{
length++;
new (std::addressof (arrayZ[length - 1])) Type ();
}
for (; length < size; length++)
new (std::addressof (arrayZ[length])) Type ();
}
template <typename T = Type,