[array] Swap order of args to hb_equal()

Prioritizes Key::cmp() over table's cmp.
This commit is contained in:
Behdad Esfahbod 2021-02-05 13:41:19 -05:00
parent 98374cebe1
commit 836814a571
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&>
bool lfind (const T &x, unsigned *pos = nullptr) const
{
for (unsigned i = 0; i < length; ++i)
if (hb_equal (this->arrayZ[i], x))
if (hb_equal (x, this->arrayZ[i]))
{
if (pos)
*pos = i;