From 96cf0889804b7d72a96274b25641bb18f7dd2e1e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 24 Nov 2018 01:07:15 -0500 Subject: [PATCH] [arrays] More --- src/hb-face.cc | 6 +++--- src/hb-vector.hh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hb-face.cc b/src/hb-face.cc index e23842f..5b33784 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -588,10 +588,10 @@ struct hb_face_builder_data_t { struct table_entry_t { - inline int cmp (const hb_tag_t *t) const + inline int cmp (hb_tag_t t) const { - if (*t < tag) return -1; - if (*t > tag) return -1; + if (t < tag) return -1; + if (t > tag) return -1; return 0; } diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 436b92b..e17f889 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -233,7 +233,7 @@ struct hb_vector_t { Type *array = arrayZ(); for (unsigned int i = 0; i < len; i++) - if (0 == array[i].cmp (&x)) + if (0 == array[i].cmp (x)) return &array[i]; return nullptr; } @@ -242,7 +242,7 @@ struct hb_vector_t { const Type *array = arrayZ(); for (unsigned int i = 0; i < len; i++) - if (0 == array[i].cmp (&x)) + if (0 == array[i].cmp (x)) return &array[i]; return nullptr; } -- 2.7.4