[vector] Simplify a method

This commit is contained in:
Behdad Esfahbod 2025-02-24 21:04:34 -07:00
parent 6fe550306c
commit 46485124ea

View file

@ -55,10 +55,7 @@ struct hb_vector_t
hb_requires (hb_is_iterable (Iterable))>
hb_vector_t (const Iterable &o) : hb_vector_t ()
{
auto iter = hb_iter (o);
if (iter.is_random_access_iterator || iter.has_fast_len)
alloc (hb_len (iter), true);
hb_copy (iter, *this);
extend (o);
}
template <typename Iterable,
hb_requires (hb_is_iterable (Iterable))>