From c813f84235b16994c293d2ffa4584056a97c8e73 Mon Sep 17 00:00:00 2001 From: Joel Auterson Date: Thu, 20 Oct 2022 19:45:23 +0100 Subject: [PATCH] Make build work for arm-none-eabi --- src/graph/graph.hh | 14 +++++++------- src/hb-ot-layout-common.hh | 8 ++++---- src/hb-ot-post-table-v2subset.hh | 4 ++-- src/hb-ot-var-fvar-table.hh | 2 +- src/hb-repacker.hh | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/graph/graph.hh b/src/graph/graph.hh index 79c7e690a..06e84780c 100644 --- a/src/graph/graph.hh +++ b/src/graph/graph.hh @@ -580,7 +580,7 @@ struct graph_t while (roots) { - unsigned next = HB_SET_VALUE_INVALID; + uint32_t next = HB_SET_VALUE_INVALID; if (unlikely (!check_success (!roots.in_error ()))) break; if (!roots.next (&next)) break; @@ -661,8 +661,8 @@ struct graph_t auto new_subgraph = + subgraph.keys () - | hb_map([&] (unsigned node_idx) { - const unsigned *v; + | hb_map([&] (uint32_t node_idx) { + const uint32_t *v; if (index_map.has (node_idx, &v)) return *v; return node_idx; }) @@ -672,10 +672,10 @@ struct graph_t remap_obj_indices (index_map, parents.iter (), true); // Update roots set with new indices as needed. - unsigned next = HB_SET_VALUE_INVALID; + uint32_t next = HB_SET_VALUE_INVALID; while (roots.next (&next)) { - const unsigned *v; + const uint32_t *v; if (index_map.has (next, &v)) { roots.del (next); @@ -690,7 +690,7 @@ struct graph_t { for (const auto& link : vertices_[node_idx].obj.all_links ()) { - const unsigned *v; + const uint32_t *v; if (subgraph.has (link.objidx, &v)) { subgraph.set (link.objidx, *v + 1); @@ -1183,7 +1183,7 @@ struct graph_t { for (auto& link : vertices_[i].obj.all_links_writer ()) { - const unsigned *v; + const uint32_t *v; if (!id_map.has (link.objidx, &v)) continue; if (only_wide && !(link.width == 4 && !link.is_signed)) continue; diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 579abf011..91c55f788 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -1079,7 +1079,7 @@ struct LangSys auto *out = c->serializer->start_embed (*this); if (unlikely (!out || !c->serializer->extend_min (out))) return_trace (false); - const unsigned *v; + const uint32_t *v; out->reqFeatureIndex = l->feature_index_map->has (reqFeatureIndex, &v) ? *v : 0xFFFFu; if (!l->visitFeatureIndex (featureIndex.len)) @@ -1548,7 +1548,7 @@ struct ClassDefFormat1_3 startGlyph = glyph_min; if (unlikely (!classValue.serialize (c, glyph_count))) return_trace (false); - for (const hb_pair_t gid_klass_pair : + it) + for (const hb_pair_t gid_klass_pair : + it) { unsigned idx = gid_klass_pair.first - glyph_min; classValue[idx] = gid_klass_pair.second; @@ -1675,11 +1675,11 @@ struct ClassDefFormat1_3 if (klass == 0) { unsigned start_glyph = startGlyph; - for (unsigned g = HB_SET_VALUE_INVALID; + for (uint32_t g = HB_SET_VALUE_INVALID; hb_set_next (glyphs, &g) && g < start_glyph;) intersect_glyphs->add (g); - for (unsigned g = startGlyph + count - 1; + for (uint32_t g = startGlyph + count - 1; hb_set_next (glyphs, &g);) intersect_glyphs->add (g); diff --git a/src/hb-ot-post-table-v2subset.hh b/src/hb-ot-post-table-v2subset.hh index 4d427e543..951e6395d 100644 --- a/src/hb-ot-post-table-v2subset.hh +++ b/src/hb-ot-post-table-v2subset.hh @@ -78,14 +78,14 @@ HB_INTERNAL bool postV2Tail::subset (hb_subset_context_t *c) const post::accelerator_t _post (c->plan->source); - hb_hashmap_t glyph_name_to_new_index; + hb_hashmap_t glyph_name_to_new_index; for (hb_codepoint_t new_gid = 0; new_gid < num_glyphs; new_gid++) { hb_codepoint_t old_gid = reverse_glyph_map.get (new_gid); unsigned old_index = glyphNameIndex[old_gid]; unsigned new_index; - const unsigned *new_index2; + const uint32_t *new_index2; if (old_index <= 257) new_index = old_index; else if (old_new_index_map.has (old_index, &new_index2)) { diff --git a/src/hb-ot-var-fvar-table.hh b/src/hb-ot-var-fvar-table.hh index af2386287..ef868e454 100644 --- a/src/hb-ot-var-fvar-table.hh +++ b/src/hb-ot-var-fvar-table.hh @@ -59,7 +59,7 @@ struct InstanceRecord const hb_hashmap_t *axes_location = c->plan->user_axes_location; for (unsigned i = 0 ; i < axis_count; i++) { - unsigned *axis_tag; + uint32_t *axis_tag; // only keep instances whose coordinates == pinned axis location if (!c->plan->axes_old_index_tag_map->has (i, &axis_tag)) continue; diff --git a/src/hb-repacker.hh b/src/hb-repacker.hh index c97ce6cc2..70f1d0e08 100644 --- a/src/hb-repacker.hh +++ b/src/hb-repacker.hh @@ -209,7 +209,7 @@ bool _try_isolating_subgraphs (const hb_vector_t& over // Only move at most half of the roots in a space at a time. unsigned extra = roots_to_isolate.get_population () - maximum_to_move; while (extra--) { - unsigned root = HB_SET_VALUE_INVALID; + uint32_t root = HB_SET_VALUE_INVALID; roots_to_isolate.previous (&root); roots_to_isolate.del (root); }