From 3fbd242ba62835a5c41164807bfdb0e4f63260da Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Fri, 29 Mar 2019 23:53:06 -0700 Subject: [PATCH] replace .set() with = remove .gitignore --- .gitignore | 1 - src/hb-ot-var-gvar-table.hh | 26 +++++++++++++------------- src/hb-ot-var-hvar-table.hh | 18 +++++++++--------- 3 files changed, 22 insertions(+), 23 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index da127e065..000000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -libtool diff --git a/src/hb-ot-var-gvar-table.hh b/src/hb-ot-var-gvar-table.hh index 9def7a3c2..2241ecb56 100644 --- a/src/hb-ot-var-gvar-table.hh +++ b/src/hb-ot-var-gvar-table.hh @@ -426,13 +426,13 @@ struct gvar gvar *out = c->serializer->allocate_min (); if (unlikely (!out)) return_trace (false); - out->version.major.set (1); - out->version.minor.set (0); - out->axisCount.set (axisCount); - out->sharedTupleCount.set (sharedTupleCount); + out->version.major = 1; + out->version.minor = 0; + out->axisCount = axisCount; + out->sharedTupleCount = sharedTupleCount; unsigned int num_glyphs = c->plan->num_output_glyphs (); - out->glyphCount.set (num_glyphs); + out->glyphCount = num_glyphs; unsigned int subset_data_size = 0; for (hb_codepoint_t gid = 0; gid < num_glyphs; gid++) @@ -443,26 +443,26 @@ struct gvar } bool long_offset = subset_data_size & ~0xFFFFu; - out->flags.set (long_offset? 1: 0); + out->flags = long_offset? 1: 0; HBUINT8 *subset_offsets = c->serializer->allocate_size ((long_offset? 4: 2) * (num_glyphs+1)); if (!subset_offsets) return_trace (false); /* shared tuples */ if (!sharedTupleCount || !sharedTuples) - out->sharedTuples.set (0); + out->sharedTuples = 0; else { unsigned int shared_tuple_size = F2DOT14::static_size * axisCount * sharedTupleCount; F2DOT14 *tuples = c->serializer->allocate_size (shared_tuple_size); if (!tuples) return_trace (false); - out->sharedTuples.set ((char *)tuples - (char *)out); + out->sharedTuples = (char *)tuples - (char *)out; memcpy (tuples, &(this+sharedTuples), shared_tuple_size); } char *subset_data = c->serializer->allocate_size(subset_data_size); if (!subset_data) return_trace (false); - out->dataZ.set (subset_data - (char *)out); + out->dataZ = subset_data - (char *)out; unsigned int glyph_offset = 0; for (hb_codepoint_t gid = 0; gid < num_glyphs; gid++) @@ -471,18 +471,18 @@ struct gvar unsigned int length = c->plan->old_gid_for_new_gid (gid, &old_gid)? get_glyph_var_data_length (old_gid): 0; if (long_offset) - ((HBUINT32 *)subset_offsets)[gid].set (glyph_offset); + ((HBUINT32 *)subset_offsets)[gid] = glyph_offset; else - ((HBUINT16 *)subset_offsets)[gid].set (glyph_offset / 2); + ((HBUINT16 *)subset_offsets)[gid] = glyph_offset / 2; if (length > 0) memcpy (subset_data, get_glyph_var_data (old_gid), length); subset_data += length; glyph_offset += length; } if (long_offset) - ((HBUINT32 *)subset_offsets)[num_glyphs].set (glyph_offset); + ((HBUINT32 *)subset_offsets)[num_glyphs] = glyph_offset; else - ((HBUINT16 *)subset_offsets)[num_glyphs].set (glyph_offset / 2); + ((HBUINT16 *)subset_offsets)[num_glyphs] = glyph_offset / 2; return_trace (true); } diff --git a/src/hb-ot-var-hvar-table.hh b/src/hb-ot-var-hvar-table.hh index 90c287049..bb1a9349a 100644 --- a/src/hb-ot-var-hvar-table.hh +++ b/src/hb-ot-var-hvar-table.hh @@ -56,8 +56,8 @@ struct DeltaSetIndexMap return_trace (false); if (unlikely (!c->extend_min (*this))) return_trace (false); - format.set (((width-1)<<4)|(inner_bit_count-1)); - mapCount.set (output_map.length); + format = ((width-1)<<4)|(inner_bit_count-1); + mapCount = output_map.length; HBUINT8 *p = c->allocate_size (width * output_map.length); if (unlikely (!p)) return_trace (false); for (unsigned int i = 0; i < output_map.length; i++) @@ -68,7 +68,7 @@ struct DeltaSetIndexMap unsigned int u = (outer << inner_bit_count)|inner; for (unsigned int w = width; w > 0;) { - p[--w].set (u); + p[--w] = u; u >>= 8; } p += width; @@ -330,15 +330,15 @@ struct HVARVVAR { TRACE_SUBSET (this); if (im_plans[index_map_subset_plan_t::ADV_INDEX].is_identity ()) - advMap.set (0); + advMap = 0; else if (unlikely (!advMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::ADV_INDEX]))) return_trace (false); if (im_plans[index_map_subset_plan_t::LSB_INDEX].is_identity ()) - lsbMap.set (0); + lsbMap = 0; else if (unlikely (!lsbMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::LSB_INDEX]))) return_trace (false); if (im_plans[index_map_subset_plan_t::RSB_INDEX].is_identity ()) - rsbMap.set (0); + rsbMap = 0; else if (unlikely (!rsbMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::RSB_INDEX]))) return_trace (false); @@ -359,8 +359,8 @@ struct HVARVVAR T *out = c->serializer->allocate_min (); if (unlikely (!out)) return_trace (false); - out->version.major.set (1); - out->version.minor.set (0); + out->version.major = 1; + out->version.minor = 0; if (!unlikely (out->varStore.serialize (c->serializer, out) .serialize (c->serializer, hvar_plan.var_store, hvar_plan.inner_remaps.as_array ()))) @@ -430,7 +430,7 @@ struct VVAR : HVARVVAR { if (unlikely (!HVARVVAR::serialize_index_maps (c, im_plans))) return_trace (false); if (!im_plans[index_map_subset_plan_t::VORG_INDEX].get_map_count ()) - vorgMap.set (0); + vorgMap = 0; else if (unlikely (!vorgMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::VORG_INDEX]))) return_trace (false);