mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
[TupleValues] Add a pre-alloc
This commit is contained in:
1 parent
3ffd92f096
commit
cf3ce69f00
1 file changed
+2
@@ -1722,6 +1722,8 @@ struct TupleValues
|
||||
{
|
||||
unsigned i = 0;
|
||||
unsigned count = consume_all ? UINT_MAX : values.length;
|
||||
if (consume_all)
|
||||
values.alloc ((end - p) / 2);
|
||||
while (i < count)
|
||||
{
|
||||
if (unlikely (p + 1 > end)) return consume_all;
|
||||
|
||||
Reference in new issue
Block a user