diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 85332b0f76fa48fdcbda80af87d685e6bf3f35b3..431a12bc7a676569d04bfc7dd8281ddd64f51a07 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -77,7 +77,7 @@ struct LookupFormat0 template struct LookupSegmentSingle { - enum { TerminationWordCount = 2 }; + enum { TerminationWordCount = 2u }; int cmp (hb_codepoint_t g) const { return g < first ? -1 : g <= last ? 0 : +1 ; } @@ -136,7 +136,7 @@ struct LookupFormat2 template struct LookupSegmentArray { - enum { TerminationWordCount = 2 }; + enum { TerminationWordCount = 2u }; const T* get_value (hb_codepoint_t glyph_id, const void *base) const { @@ -207,7 +207,7 @@ struct LookupFormat4 template struct LookupSingle { - enum { TerminationWordCount = 1 }; + enum { TerminationWordCount = 1u }; int cmp (hb_codepoint_t g) const { return glyph.cmp (g); } diff --git a/src/hb-buffer.hh b/src/hb-buffer.hh index 8a3170ca9a5a6705b9ebcb1f861c34ae65fc72d7..ab963a5fbe608a8bc649e23d24c6e3500048c506 100644 --- a/src/hb-buffer.hh +++ b/src/hb-buffer.hh @@ -119,7 +119,7 @@ struct hb_buffer_t /* Text before / after the main buffer contents. * Always in Unicode, and ordered outward. * Index 0 is for "pre-context", 1 for "post-context". */ - enum { CONTEXT_LENGTH = 5 }; + enum { CONTEXT_LENGTH = 5u }; hb_codepoint_t context[2][CONTEXT_LENGTH]; unsigned int context_len[2]; diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 672d4ee2e6a163dd2943a028a16f5816415c91c3..179db6523844363010016611d63fe6ccd7db04c6 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -1299,7 +1299,7 @@ hb_ot_layout_feature_get_characters (hb_face_t *face, struct GSUBProxy { - enum { table_index = 0 }; + enum { table_index = 0u }; enum { inplace = false }; typedef OT::SubstLookup Lookup; @@ -1313,7 +1313,7 @@ struct GSUBProxy struct GPOSProxy { - enum { table_index = 1 }; + enum { table_index = 1u }; enum { inplace = true }; typedef OT::PosLookup Lookup; @@ -1387,7 +1387,7 @@ apply_string (OT::hb_ot_apply_context_t *c, if (likely (!lookup.is_reverse ())) { /* in/out forward substitution/positioning */ - if (Proxy::table_index == 0) + if (Proxy::table_index == 0u) buffer->clear_output (); buffer->idx = 0; @@ -1404,7 +1404,7 @@ apply_string (OT::hb_ot_apply_context_t *c, else { /* in-place backward substitution/positioning */ - if (Proxy::table_index == 0) + if (Proxy::table_index == 0u) buffer->remove_output (); buffer->idx = buffer->len - 1;