diff options
author | Youngbok Shin <youngb.shin@samsung.com> | 2018-04-03 14:01:34 +0900 |
---|---|---|
committer | Youngbok Shin <youngb.shin@samsung.com> | 2018-04-03 14:01:34 +0900 |
commit | 1c272a48507bb3c7905aa30d8bf0d092b474f781 (patch) | |
tree | ba3189af507d7357414e13ec3c4351cafdd2aea4 /src/hb-ot-shape-complex-arabic-fallback.hh | |
parent | e3a9d0d2fe726180a0456893d22d4aaa3ddb8931 (diff) | |
download | harfbuzz-1c272a48507bb3c7905aa30d8bf0d092b474f781.tar.gz harfbuzz-1c272a48507bb3c7905aa30d8bf0d092b474f781.tar.bz2 harfbuzz-1c272a48507bb3c7905aa30d8bf0d092b474f781.zip |
Imported Upstream version 1.7.6upstream/1.7.6
Diffstat (limited to 'src/hb-ot-shape-complex-arabic-fallback.hh')
-rw-r--r-- | src/hb-ot-shape-complex-arabic-fallback.hh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/hb-ot-shape-complex-arabic-fallback.hh b/src/hb-ot-shape-complex-arabic-fallback.hh index d97d285..5a257f0 100644 --- a/src/hb-ot-shape-complex-arabic-fallback.hh +++ b/src/hb-ot-shape-complex-arabic-fallback.hh @@ -73,11 +73,11 @@ arabic_fallback_synthesize_lookup_single (const hb_ot_shape_plan_t *plan HB_UNUS } if (!num_glyphs) - return NULL; + return nullptr; /* Bubble-sort or something equally good! * May not be good-enough for presidential candidate interviews, but good-enough for us... */ - hb_stable_sort (&glyphs[0], num_glyphs, OT::GlyphID::cmp, &substitutes[0]); + hb_stable_sort (&glyphs[0], num_glyphs, (int(*)(const OT::GlyphID*, const OT::GlyphID *)) OT::GlyphID::cmp, &substitutes[0]); OT::Supplier<OT::GlyphID> glyphs_supplier (glyphs, num_glyphs); OT::Supplier<OT::GlyphID> substitutes_supplier (substitutes, num_glyphs); @@ -94,7 +94,7 @@ arabic_fallback_synthesize_lookup_single (const hb_ot_shape_plan_t *plan HB_UNUS c.end_serialize (); /* TODO sanitize the results? */ - return ret ? c.copy<OT::SubstLookup> () : NULL; + return ret ? c.copy<OT::SubstLookup> () : nullptr; } static OT::SubstLookup * @@ -126,7 +126,7 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN first_glyphs_indirection[num_first_glyphs] = first_glyph_idx; num_first_glyphs++; } - hb_stable_sort (&first_glyphs[0], num_first_glyphs, OT::GlyphID::cmp, &first_glyphs_indirection[0]); + hb_stable_sort (&first_glyphs[0], num_first_glyphs, (int(*)(const OT::GlyphID*, const OT::GlyphID *)) OT::GlyphID::cmp, &first_glyphs_indirection[0]); /* Now that the first-glyphs are sorted, walk again, populate ligatures. */ for (unsigned int i = 0; i < num_first_glyphs; i++) @@ -153,7 +153,7 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN } if (!num_ligatures) - return NULL; + return nullptr; OT::Supplier<OT::GlyphID> first_glyphs_supplier (first_glyphs, num_first_glyphs); OT::Supplier<unsigned int > ligature_per_first_glyph_count_supplier (ligature_per_first_glyph_count_list, num_first_glyphs); @@ -177,7 +177,7 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN c.end_serialize (); /* TODO sanitize the results? */ - return ret ? c.copy<OT::SubstLookup> () : NULL; + return ret ? c.copy<OT::SubstLookup> () : nullptr; } static OT::SubstLookup * @@ -237,8 +237,8 @@ arabic_fallback_plan_init_win1256 (arabic_fallback_plan_t *fallback_plan, return false; const Manifest &manifest = reinterpret_cast<const Manifest&> (arabic_win1256_gsub_lookups.manifest); - ASSERT_STATIC (sizeof (arabic_win1256_gsub_lookups.manifestData) / sizeof (ManifestLookup) - <= ARABIC_FALLBACK_MAX_LOOKUPS); + static_assert (sizeof (arabic_win1256_gsub_lookups.manifestData) / sizeof (ManifestLookup) + <= ARABIC_FALLBACK_MAX_LOOKUPS, ""); /* TODO sanitize the table? */ unsigned j = 0; @@ -271,7 +271,7 @@ arabic_fallback_plan_init_unicode (arabic_fallback_plan_t *fallback_plan, const hb_ot_shape_plan_t *plan, hb_font_t *font) { - ASSERT_STATIC (ARRAY_LENGTH_CONST(arabic_fallback_features) <= ARABIC_FALLBACK_MAX_LOOKUPS); + static_assert ((ARRAY_LENGTH_CONST(arabic_fallback_features) <= ARABIC_FALLBACK_MAX_LOOKUPS), ""); unsigned int j = 0; for (unsigned int i = 0; i < ARRAY_LENGTH(arabic_fallback_features) ; i++) { @@ -340,7 +340,7 @@ arabic_fallback_plan_shape (arabic_fallback_plan_t *fallback_plan, hb_font_t *font, hb_buffer_t *buffer) { - OT::hb_apply_context_t c (0, font, buffer); + OT::hb_ot_apply_context_t c (0, font, buffer); for (unsigned int i = 0; i < fallback_plan->num_lookups; i++) if (fallback_plan->lookup_array[i]) { c.set_lookup_mask (fallback_plan->mask_array[i]); |