[vector] Remove a for loop
This commit is contained in:
parent
afd9a58bd7
commit
bc8eded296
|
@ -232,9 +232,10 @@ struct hb_vector_t
|
||||||
if (likely (new_array))
|
if (likely (new_array))
|
||||||
{
|
{
|
||||||
for (unsigned i = 0; i < length; i++)
|
for (unsigned i = 0; i < length; i++)
|
||||||
|
{
|
||||||
new (std::addressof (new_array[i])) Type ();
|
new (std::addressof (new_array[i])) Type ();
|
||||||
for (unsigned i = 0; i < (unsigned) length; i++)
|
|
||||||
new_array[i] = std::move (arrayZ[i]);
|
new_array[i] = std::move (arrayZ[i]);
|
||||||
|
}
|
||||||
unsigned old_length = length;
|
unsigned old_length = length;
|
||||||
shrink_vector (0);
|
shrink_vector (0);
|
||||||
length = old_length;
|
length = old_length;
|
||||||
|
|
Loading…
Reference in New Issue