[vector] Save a couple hb_iter() invocations
This commit is contained in:
parent
3ead9863d2
commit
afd9a58bd7
|
@ -53,9 +53,10 @@ struct hb_vector_t
|
|||
hb_requires (hb_is_iterable (Iterable))>
|
||||
hb_vector_t (const Iterable &o) : hb_vector_t ()
|
||||
{
|
||||
if (hb_iter (o).is_random_access_iterator)
|
||||
alloc (hb_len (hb_iter (o)));
|
||||
hb_copy (o, *this);
|
||||
auto iter = hb_iter (o);
|
||||
if (iter.is_random_access_iterator)
|
||||
alloc (hb_len (iter));
|
||||
hb_copy (iter, *this);
|
||||
}
|
||||
hb_vector_t (const hb_vector_t &o) : hb_vector_t ()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue