From 4d67743ffd99ed9f2278ab21adfac7eb314c0df0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 10 May 2019 16:35:31 -0700 Subject: [PATCH] [subset] Use more auto typing --- src/hb-ot-layout-common.hh | 8 ++++---- src/hb-ot-layout-gdef-table.hh | 2 +- src/hb-ot-layout-gsubgpos.hh | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 40349a0..0178958 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -138,7 +138,7 @@ struct RecordListOf : RecordArrayOf bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - struct RecordListOf *out = c->serializer->embed (*this); + auto *out = c->serializer->embed (*this); if (unlikely (!out)) return_trace (false); unsigned int count = this->len; for (unsigned int i = 0; i < count; i++) @@ -277,7 +277,7 @@ struct Script bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - struct Script *out = c->serializer->embed (*this); + auto *out = c->serializer->embed (*this); if (unlikely (!out)) return_trace (false); out->defaultLangSys.serialize_copy (c->serializer, this+defaultLangSys, out); unsigned int count = langSys.len; @@ -559,7 +559,7 @@ struct Feature bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - struct Feature *out = c->serializer->embed (*this); + auto *out = c->serializer->embed (*this); if (unlikely (!out)) return_trace (false); out->featureParams = 0; /* TODO(subset) FeatureParams. */ return_trace (true); @@ -722,7 +722,7 @@ struct Lookup bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - struct Lookup *out = c->serializer->embed (*this); + auto *out = c->serializer->embed (*this); if (unlikely (!out)) return_trace (false); /* Subset the actual subtables. */ diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh index 5d9a3ec..ac1bddb 100644 --- a/src/hb-ot-layout-gdef-table.hh +++ b/src/hb-ot-layout-gdef-table.hh @@ -439,7 +439,7 @@ struct GDEF bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - struct GDEF *out = c->serializer->embed (*this); + auto *out = c->serializer->embed (*this); if (unlikely (!out)) return_trace (false); out->glyphClassDef.serialize_subset (c, this+glyphClassDef, out); diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 9d7481b..182f9a0 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -849,7 +849,7 @@ static inline bool match_input (hb_ot_apply_context_t *c, if (ligbase == LIGBASE_NOT_CHECKED) { bool found = false; - const hb_glyph_info_t *out = buffer->out_info; + const auto *out = buffer->out_info; unsigned int j = buffer->out_len; while (j && _hb_glyph_info_get_lig_id (&out[j - 1]) == first_lig_id) { @@ -2661,7 +2661,7 @@ struct GSUBGPOS bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - struct GSUBGPOS *out = c->serializer->embed (*this); + auto *out = c->serializer->embed (*this); if (unlikely (!out)) return_trace (false); out->scriptList.serialize_subset (c, this+scriptList, out); -- 2.7.4