[subset] Use more auto typing

This commit is contained in:
Behdad Esfahbod 2019-05-10 16:35:31 -07:00
parent a27a31b9ee
commit 4d67743ffd
3 changed files with 7 additions and 7 deletions

View 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. */

View 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);

View 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);