[subset] Use more auto typing
authorBehdad Esfahbod <behdad@behdad.org>
Fri, 10 May 2019 23:35:31 +0000 (16:35 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 11 May 2019 01:43:48 +0000 (18:43 -0700)
src/hb-ot-layout-common.hh
src/hb-ot-layout-gdef-table.hh
src/hb-ot-layout-gsubgpos.hh

index 40349a0..0178958 100644 (file)
@@ -138,7 +138,7 @@ struct RecordListOf : RecordArrayOf<Type>
   bool subset (hb_subset_context_t *c) const
   {
     TRACE_SUBSET (this);
-    struct RecordListOf<Type> *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. */
index 5d9a3ec..ac1bddb 100644 (file)
@@ -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);
index 9d7481b..182f9a0 100644 (file)
@@ -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);