From 043b610fa698ed247347dfaa042f032f3fd3f572 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 19 Jan 2019 09:20:46 -0500 Subject: [PATCH] Fix sign compare warnings ../../third_party/harfbuzz-ng/src/src/hb-map.hh(56,45): warning: comparison of integers of different signs: 'const hb_codepoint_t' (aka 'const unsigned int') and 'hb_map_t::(anonymous enum at ../../third_party/harfbuzz-ng/src/src/hb-map.hh:169:3)' [-Wsign-compare] bool is_unused () const { return key == INVALID; } --- src/hb-map.hh | 2 +- src/hb-set.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-map.hh b/src/hb-map.hh index 3b119daa8..40c232eb0 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -166,7 +166,7 @@ struct hb_map_t hb_codepoint_t operator [] (unsigned int key) const { return get (key); } - enum { INVALID = HB_MAP_VALUE_INVALID }; + static const hb_codepoint_t INVALID = HB_MAP_VALUE_INVALID; void clear () { diff --git a/src/hb-set.hh b/src/hb-set.hh index 990c2953c..86a06fab5 100644 --- a/src/hb-set.hh +++ b/src/hb-set.hh @@ -666,7 +666,7 @@ struct hb_set_t return INVALID; } - static const hb_codepoint_t INVALID = HB_SET_VALUE_INVALID; + static const hb_codepoint_t INVALID = HB_SET_VALUE_INVALID; /* * Iterator implementation.