From ad3f2f77dafdee524e836e732077ee9670602369 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Mon, 26 Feb 2018 17:51:27 -0800 Subject: [PATCH] [subset] small cleanups in hb-ot-os2-table. --- src/hb-ot-os2-table.hh | 5 +++-- src/hb-ot-os2-unicode-ranges.hh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-os2-table.hh b/src/hb-ot-os2-table.hh index 754537a6a..6cb8d4949 100644 --- a/src/hb-ot-os2-table.hh +++ b/src/hb-ot-os2-table.hh @@ -83,8 +83,9 @@ struct os2 for (unsigned int i = 0; i < codepoints.len; i++) { hb_codepoint_t cp = codepoints[i]; - int bit = hb_get_unicode_range_bit (cp); - if (bit >= 0 && bit < 128) { + unsigned int bit = hb_get_unicode_range_bit (cp); + if (bit < 128) + { unsigned int block = bit / 32; unsigned int bit_in_block = bit % 32; unsigned int mask = 1 << bit_in_block; diff --git a/src/hb-ot-os2-unicode-ranges.hh b/src/hb-ot-os2-unicode-ranges.hh index f4b339eaf..2c05d895e 100644 --- a/src/hb-ot-os2-unicode-ranges.hh +++ b/src/hb-ot-os2-unicode-ranges.hh @@ -230,7 +230,7 @@ _compare_range (const void *_key, const void *_item, void *_arg) * hb_get_unicode_range_bit: * Returns the bit to be set in os/2 ulUnicodeRange for a given codepoint. **/ -static int +static unsigned int hb_get_unicode_range_bit (hb_codepoint_t cp) { Range *range = (Range*) hb_bsearch_r (&cp, os2UnicodeRangesSorted,