Remove lsearch for small TableDirectorys
This commit is contained in:
parent
04f7e55369
commit
e2ffb33a53
|
@ -111,9 +111,7 @@ typedef struct OffsetTable
|
||||||
{
|
{
|
||||||
Tag t;
|
Tag t;
|
||||||
t.set (tag);
|
t.set (tag);
|
||||||
/* Linear-search for small tables to work around fonts with unsorted
|
int i = tables.bsearch (t);
|
||||||
* table list. */
|
|
||||||
int i = tables.len < 64 ? tables.lsearch (t) : tables.bsearch (t);
|
|
||||||
if (table_index)
|
if (table_index)
|
||||||
*table_index = i == -1 ? (unsigned) Index::NOT_FOUND_INDEX : (unsigned) i;
|
*table_index = i == -1 ? (unsigned) Index::NOT_FOUND_INDEX : (unsigned) i;
|
||||||
return i != -1;
|
return i != -1;
|
||||||
|
|
Loading…
Reference in New Issue