[subset] small cleanups in hb-ot-os2-table.

This commit is contained in:
Garret Rieger 2018-02-26 17:51:27 -08:00
parent f1c8fc3487
commit ad3f2f77da
2 changed files with 4 additions and 3 deletions

View File

@ -83,8 +83,9 @@ struct os2
for (unsigned int i = 0; i < codepoints.len; i++) for (unsigned int i = 0; i < codepoints.len; i++)
{ {
hb_codepoint_t cp = codepoints[i]; hb_codepoint_t cp = codepoints[i];
int bit = hb_get_unicode_range_bit (cp); unsigned int bit = hb_get_unicode_range_bit (cp);
if (bit >= 0 && bit < 128) { if (bit < 128)
{
unsigned int block = bit / 32; unsigned int block = bit / 32;
unsigned int bit_in_block = bit % 32; unsigned int bit_in_block = bit % 32;
unsigned int mask = 1 << bit_in_block; unsigned int mask = 1 << bit_in_block;

View File

@ -230,7 +230,7 @@ _compare_range (const void *_key, const void *_item, void *_arg)
* hb_get_unicode_range_bit: * hb_get_unicode_range_bit:
* Returns the bit to be set in os/2 ulUnicodeRange for a given codepoint. * 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) hb_get_unicode_range_bit (hb_codepoint_t cp)
{ {
Range *range = (Range*) hb_bsearch_r (&cp, os2UnicodeRangesSorted, Range *range = (Range*) hb_bsearch_r (&cp, os2UnicodeRangesSorted,