From 849e40b4db814bc6fe5defa5b802cc534aab209a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 19 Jan 2022 11:06:33 -0700 Subject: [PATCH] [ms-feature-ranges] Use preferred vector search API --- src/hb-ms-feature-ranges.cc | 2 +- src/hb-ms-feature-ranges.hh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-ms-feature-ranges.cc b/src/hb-ms-feature-ranges.cc index 6d09b252d..a5a01f4b8 100644 --- a/src/hb-ms-feature-ranges.cc +++ b/src/hb-ms-feature-ranges.cc @@ -114,7 +114,7 @@ hb_ms_setup_features (const hb_feature_t *features, } else { - auto *feature = active_features.find (&event->feature); + auto *feature = active_features.lsearch (event->feature); if (feature) active_features.remove (feature - active_features.arrayZ); } diff --git a/src/hb-ms-feature-ranges.hh b/src/hb-ms-feature-ranges.hh index 401d1e1d9..3a13c1b0f 100644 --- a/src/hb-ms-feature-ranges.hh +++ b/src/hb-ms-feature-ranges.hh @@ -52,8 +52,8 @@ struct hb_ms_active_feature_t { a->fea.value < b->fea.value ? -1 : a->fea.value > b->fea.value ? 1 : 0; } - bool operator== (const hb_ms_active_feature_t *f) - { return cmp (this, f) == 0; } + bool operator== (const hb_ms_active_feature_t f) const + { return cmp (this, &f) == 0; } }; struct hb_ms_feature_event_t {