mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
[vector] Simplify allocate_from_pool / set_storage
This commit is contained in:
1 parent
3ace032319
commit
c2f2121527
1 file changed
+2
-7
+2
-7
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user