Use dagger in OffsetTable::get_table_tags (#2477)

This commit is contained in:
Ebrahim Byagowi 2020-06-20 01:36:50 +04:30 committed by GitHub
parent dce4353f86
commit 25cf687443
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 9 deletions

View File

@ -91,15 +91,10 @@ typedef struct OffsetTable
{
if (table_count)
{
if (start_offset >= tables.len)
*table_count = 0;
else
*table_count = hb_min (*table_count, tables.len - start_offset);
const TableRecord *sub_tables = tables.arrayZ + start_offset;
unsigned int count = *table_count;
for (unsigned int i = 0; i < count; i++)
table_tags[i] = sub_tables[i].tag;
+ tables.sub_array (start_offset, table_count)
| hb_map (&TableRecord::tag)
| hb_sink (hb_array (table_tags, *table_count))
;
}
return tables.len;
}