[vector] Simplify allocate_from_pool / set_storage

This commit is contained in:
Behdad Esfahbod committed 2025-09-16 16:29:23 -06:00
1 parent 3ace032319
commit c2f2121527
1 file changed
+2 -7
+2 -7
View File
@@ -107,9 +107,6 @@ struct hb_vector_t
void
set_storage (Type *array, unsigned n)
{
if (unlikely (in_error ()))
return;
assert (allocated == 0);
assert (length == 0);
@@ -557,12 +554,10 @@ struct hb_vector_t
set_error ();
return false;
}
set_storage (arrayZ, size);
if (initialize)
{
length = 0;
grow_vector (size, hb_prioritize);
}
else
length = size;
return true;
}
return resize_full ((int) size, initialize, true);