From 36ed163fdd50419e4619c665a4a9dbf97f66c349 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 23 Jul 2018 11:57:45 -0700 Subject: [PATCH] Remove unnecessary OT:: namespace specifiers --- src/hb-ot-cmap-table.hh | 30 +++++++++++++++--------------- src/hb-ot-color-sbix-table.hh | 4 ++-- src/hb-ot-color-svg-table.hh | 4 ++-- src/hb-ot-glyf-table.hh | 4 ++-- src/hb-ot-hmtx-table.hh | 2 +- src/hb-ot-maxp-table.hh | 6 +++--- src/hb-ot-os2-table.hh | 4 ++-- src/hb-ot-post-table.hh | 2 +- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 22cdbaf33..a671da55d 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -894,10 +894,10 @@ struct cmap { inline void init (hb_face_t *face) { - this->blob = OT::hb_sanitize_context_t().reference_table (face); + this->blob = hb_sanitize_context_t().reference_table (face); const OT::cmap *cmap = this->blob->as (); - const OT::CmapSubtable *subtable = nullptr; - const OT::CmapSubtableFormat14 *subtable_uvs = nullptr; + const CmapSubtable *subtable = nullptr; + const CmapSubtableFormat14 *subtable_uvs = nullptr; bool symbol = false; /* 32-bit subtables. */ @@ -916,35 +916,35 @@ struct cmap if (subtable) symbol = true; } /* Meh. */ - if (!subtable) subtable = &Null(OT::CmapSubtable); + if (!subtable) subtable = &Null(CmapSubtable); /* UVS subtable. */ if (!subtable_uvs) { - const OT::CmapSubtable *st = cmap->find_subtable (0, 5); + const CmapSubtable *st = cmap->find_subtable (0, 5); if (st && st->u.format == 14) subtable_uvs = &st->u.format14; } /* Meh. */ - if (!subtable_uvs) subtable_uvs = &Null(OT::CmapSubtableFormat14); + if (!subtable_uvs) subtable_uvs = &Null(CmapSubtableFormat14); this->uvs_table = subtable_uvs; this->get_glyph_data = subtable; if (unlikely (symbol)) { - this->get_glyph_func = get_glyph_from_symbol; + this->get_glyph_func = get_glyph_from_symbol; this->get_all_codepoints_func = null_get_all_codepoints_func; } else { switch (subtable->u.format) { /* Accelerate format 4 and format 12. */ default: - this->get_glyph_func = get_glyph_from; + this->get_glyph_func = get_glyph_from; this->get_all_codepoints_func = null_get_all_codepoints_func; break; case 12: - this->get_glyph_func = get_glyph_from; - this->get_all_codepoints_func = get_all_codepoints_from; + this->get_glyph_func = get_glyph_from; + this->get_all_codepoints_func = get_all_codepoints_from; break; case 4: { @@ -977,9 +977,9 @@ struct cmap variation_selector, glyph)) { - case OT::GLYPH_VARIANT_NOT_FOUND: return false; - case OT::GLYPH_VARIANT_FOUND: return true; - case OT::GLYPH_VARIANT_USE_DEFAULT: break; + case GLYPH_VARIANT_NOT_FOUND: return false; + case GLYPH_VARIANT_FOUND: return true; + case GLYPH_VARIANT_USE_DEFAULT: break; } return get_nominal_glyph (unicode, glyph); @@ -1046,9 +1046,9 @@ struct cmap const void *get_glyph_data; hb_cmap_get_all_codepoints_func_t get_all_codepoints_func; - OT::CmapSubtableFormat4::accelerator_t format4_accel; + CmapSubtableFormat4::accelerator_t format4_accel; - const OT::CmapSubtableFormat14 *uvs_table; + const CmapSubtableFormat14 *uvs_table; hb_blob_t *blob; }; diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh index dcfeef46c..0461afa32 100644 --- a/src/hb-ot-color-sbix-table.hh +++ b/src/hb-ot-color-sbix-table.hh @@ -96,9 +96,9 @@ struct sbix { inline void init (hb_face_t *face) { - sbix_blob = OT::hb_sanitize_context_t().reference_table (face); + sbix_blob = hb_sanitize_context_t().reference_table (face); sbix_len = hb_blob_get_length (sbix_blob); - sbix_table = sbix_blob->as (); + sbix_table = sbix_blob->as (); } inline void fini (void) diff --git a/src/hb-ot-color-svg-table.hh b/src/hb-ot-color-svg-table.hh index 9bfd266c7..3976694f8 100644 --- a/src/hb-ot-color-svg-table.hh +++ b/src/hb-ot-color-svg-table.hh @@ -96,9 +96,9 @@ struct SVG { inline void init (hb_face_t *face) { - svg_blob = OT::hb_sanitize_context_t().reference_table (face); + svg_blob = hb_sanitize_context_t().reference_table (face); svg_len = hb_blob_get_length (svg_blob); - svg = svg_blob->as (); + svg = svg_blob->as (); } inline void fini (void) diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh index b670d792f..ce6ee1e22 100644 --- a/src/hb-ot-glyf-table.hh +++ b/src/hb-ot-glyf-table.hh @@ -103,14 +103,14 @@ struct glyf static bool _add_head_and_set_loca_version (hb_subset_plan_t *plan, bool use_short_loca) { - hb_blob_t *head_blob = OT::hb_sanitize_context_t().reference_table (plan->source); + hb_blob_t *head_blob = hb_sanitize_context_t().reference_table (plan->source); hb_blob_t *head_prime_blob = hb_blob_copy_writable_or_fail (head_blob); hb_blob_destroy (head_blob); if (unlikely (!head_prime_blob)) return false; - OT::head *head_prime = (OT::head *) hb_blob_get_data_writable (head_prime_blob, nullptr); + head *head_prime = (head *) hb_blob_get_data_writable (head_prime_blob, nullptr); head_prime->indexToLocFormat.set (use_short_loca ? 0 : 1); bool success = plan->add_table (HB_OT_TAG_head, head_prime_blob); diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh index 29cbc3848..13fa9d6e0 100644 --- a/src/hb-ot-hmtx-table.hh +++ b/src/hb-ot-hmtx-table.hh @@ -69,7 +69,7 @@ struct hmtxvmtx inline bool subset_update_header (hb_subset_plan_t *plan, unsigned int num_hmetrics) const { - hb_blob_t *src_blob = OT::hb_sanitize_context_t().reference_table (plan->source, H::tableTag); + hb_blob_t *src_blob = hb_sanitize_context_t().reference_table (plan->source, H::tableTag); hb_blob_t *dest_blob = hb_blob_copy_writable_or_fail(src_blob); hb_blob_destroy (src_blob); diff --git a/src/hb-ot-maxp-table.hh b/src/hb-ot-maxp-table.hh index d3849fb13..75aac4f44 100644 --- a/src/hb-ot-maxp-table.hh +++ b/src/hb-ot-maxp-table.hh @@ -100,14 +100,14 @@ struct maxp inline bool subset (hb_subset_plan_t *plan) const { - hb_blob_t *maxp_blob = OT::hb_sanitize_context_t().reference_table (plan->source); + hb_blob_t *maxp_blob = hb_sanitize_context_t().reference_table (plan->source); hb_blob_t *maxp_prime_blob = hb_blob_copy_writable_or_fail (maxp_blob); hb_blob_destroy (maxp_blob); if (unlikely (!maxp_prime_blob)) { return false; } - OT::maxp *maxp_prime = (OT::maxp *) hb_blob_get_data (maxp_prime_blob, nullptr); + maxp *maxp_prime = (maxp *) hb_blob_get_data (maxp_prime_blob, nullptr); maxp_prime->set_num_glyphs (plan->glyphs.len); if (plan->drop_hints) @@ -118,7 +118,7 @@ struct maxp return result; } - static inline void drop_hint_fields (hb_subset_plan_t *plan, OT::maxp *maxp_prime) + static inline void drop_hint_fields (hb_subset_plan_t *plan, maxp *maxp_prime) { if (maxp_prime->version.major == 1) { diff --git a/src/hb-ot-os2-table.hh b/src/hb-ot-os2-table.hh index 5aab56c41..56bbab741 100644 --- a/src/hb-ot-os2-table.hh +++ b/src/hb-ot-os2-table.hh @@ -51,12 +51,12 @@ struct os2 inline bool subset (hb_subset_plan_t *plan) const { - hb_blob_t *os2_blob = OT::hb_sanitize_context_t().reference_table (plan->source); + hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table (plan->source); hb_blob_t *os2_prime_blob = hb_blob_create_sub_blob (os2_blob, 0, -1); // TODO(grieger): move to hb_blob_copy_writable_or_fail hb_blob_destroy (os2_blob); - OT::os2 *os2_prime = (OT::os2 *) hb_blob_get_data_writable (os2_prime_blob, nullptr); + os2 *os2_prime = (os2 *) hb_blob_get_data_writable (os2_prime_blob, nullptr); if (unlikely (!os2_prime)) { hb_blob_destroy (os2_prime_blob); return false; diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh index 1d3058018..9766f3152 100644 --- a/src/hb-ot-post-table.hh +++ b/src/hb-ot-post-table.hh @@ -85,7 +85,7 @@ struct post inline bool subset (hb_subset_plan_t *plan) const { unsigned int post_prime_length; - hb_blob_t *post_blob = OT::hb_sanitize_context_t().reference_table(plan->source); + hb_blob_t *post_blob = hb_sanitize_context_t().reference_table(plan->source); hb_blob_t *post_prime_blob = hb_blob_create_sub_blob (post_blob, 0, post::static_size); post *post_prime = (post *) hb_blob_get_data_writable (post_prime_blob, &post_prime_length); hb_blob_destroy (post_blob);