Remove unnecessary OT:: namespace specifiers

This commit is contained in:
Behdad Esfahbod 2018-07-23 11:57:45 -07:00
parent c6bc7c3831
commit 36ed163fdd
8 changed files with 28 additions and 28 deletions

View File

@ -894,10 +894,10 @@ struct cmap
{
inline void init (hb_face_t *face)
{
this->blob = OT::hb_sanitize_context_t().reference_table<OT::cmap> (face);
this->blob = hb_sanitize_context_t().reference_table<cmap> (face);
const OT::cmap *cmap = this->blob->as<OT::cmap> ();
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<OT::CmapSubtable>;
this->get_glyph_func = get_glyph_from_symbol<CmapSubtable>;
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<OT::CmapSubtable>;
this->get_glyph_func = get_glyph_from<CmapSubtable>;
this->get_all_codepoints_func = null_get_all_codepoints_func;
break;
case 12:
this->get_glyph_func = get_glyph_from<OT::CmapSubtableFormat12>;
this->get_all_codepoints_func = get_all_codepoints_from<OT::CmapSubtableFormat12>;
this->get_glyph_func = get_glyph_from<CmapSubtableFormat12>;
this->get_all_codepoints_func = get_all_codepoints_from<CmapSubtableFormat12>;
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;
};

View File

@ -96,9 +96,9 @@ struct sbix
{
inline void init (hb_face_t *face)
{
sbix_blob = OT::hb_sanitize_context_t().reference_table<OT::sbix> (face);
sbix_blob = hb_sanitize_context_t().reference_table<sbix> (face);
sbix_len = hb_blob_get_length (sbix_blob);
sbix_table = sbix_blob->as<OT::sbix> ();
sbix_table = sbix_blob->as<sbix> ();
}
inline void fini (void)

View File

@ -96,9 +96,9 @@ struct SVG
{
inline void init (hb_face_t *face)
{
svg_blob = OT::hb_sanitize_context_t().reference_table<SVG> (face);
svg_blob = hb_sanitize_context_t().reference_table<SVG> (face);
svg_len = hb_blob_get_length (svg_blob);
svg = svg_blob->as<OT::SVG> ();
svg = svg_blob->as<SVG> ();
}
inline void fini (void)

View File

@ -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<OT::head> (plan->source);
hb_blob_t *head_blob = hb_sanitize_context_t().reference_table<head> (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);

View File

@ -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<H> (plan->source, H::tableTag);
hb_blob_t *src_blob = hb_sanitize_context_t().reference_table<H> (plan->source, H::tableTag);
hb_blob_t *dest_blob = hb_blob_copy_writable_or_fail(src_blob);
hb_blob_destroy (src_blob);

View File

@ -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<OT::maxp> (plan->source);
hb_blob_t *maxp_blob = hb_sanitize_context_t().reference_table<maxp> (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)
{

View File

@ -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<OT::os2> (plan->source);
hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table<os2> (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;

View File

@ -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<post>(plan->source);
hb_blob_t *post_blob = hb_sanitize_context_t().reference_table<post>(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);