[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:
parent
d67ba649a3
commit
06d3c2019f
|
@ -330,9 +330,7 @@ struct hb_sorted_array_t :
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HB_BFIND_NOT_FOUND_STORE_CLOSEST:
|
case HB_BFIND_NOT_FOUND_STORE_CLOSEST:
|
||||||
if (max < 0 || (max < (int) this->length && array[max].cmp (x) > 0))
|
*i = min;
|
||||||
max++;
|
|
||||||
*i = max;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue