[array] Simplify bfind() positioning

I had copied the old scheme from fontconfig's fccharset.c.  I just
convinced myself that this change is correct and produces exact
same results.  But I also am skeptical.  Anyone else feel like
convincing themselves as well please?
This commit is contained in:
Behdad Esfahbod 2019-12-06 02:52:54 +00:00
parent d67ba649a3
commit 06d3c2019f
1 changed files with 1 additions and 3 deletions

View File

@ -330,9 +330,7 @@ struct hb_sorted_array_t :
break;
case HB_BFIND_NOT_FOUND_STORE_CLOSEST:
if (max < 0 || (max < (int) this->length && array[max].cmp (x) > 0))
max++;
*i = max;
*i = min;
break;
}
}