Remove lsearch for small TableDirectorys

This commit is contained in:
Behdad Esfahbod 2018-11-23 16:24:28 -05:00
parent 04f7e55369
commit e2ffb33a53
1 changed files with 1 additions and 3 deletions

View File

@ -111,9 +111,7 @@ typedef struct OffsetTable
{
Tag t;
t.set (tag);
/* Linear-search for small tables to work around fonts with unsorted
* table list. */
int i = tables.len < 64 ? tables.lsearch (t) : tables.bsearch (t);
int i = tables.bsearch (t);
if (table_index)
*table_index = i == -1 ? (unsigned) Index::NOT_FOUND_INDEX : (unsigned) i;
return i != -1;