mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-14 17:13:40 +00:00
[subset/cff1] Micro-optimize string writing
This commit is contained in:
parent
35e152b9f4
commit
2960d13f1b
1 changed files with 3 additions and 1 deletions
|
@ -647,11 +647,13 @@ struct CFF1StringIndex : CFF1Index
|
|||
return_trace (true);
|
||||
}
|
||||
|
||||
if (unlikely (sidmap.in_error ())) return_trace (false);
|
||||
|
||||
byte_str_array_t bytesArray;
|
||||
if (!bytesArray.resize (sidmap.get_population ()))
|
||||
return_trace (false);
|
||||
for (auto _ : sidmap)
|
||||
bytesArray[_.second] = strings[_.first];
|
||||
bytesArray.arrayZ[_.second] = strings[_.first];
|
||||
|
||||
bool result = CFF1Index::serialize (c, bytesArray);
|
||||
return_trace (result);
|
||||
|
|
Loading…
Add table
Reference in a new issue