Make build work for arm-none-eabi

This commit is contained in:
Joel Auterson 2022-10-20 19:45:23 +01:00 committed by Behdad Esfahbod
parent b0b7a65388
commit c813f84235
5 changed files with 15 additions and 15 deletions

View File

@ -580,7 +580,7 @@ struct graph_t
while (roots) while (roots)
{ {
unsigned next = HB_SET_VALUE_INVALID; uint32_t next = HB_SET_VALUE_INVALID;
if (unlikely (!check_success (!roots.in_error ()))) break; if (unlikely (!check_success (!roots.in_error ()))) break;
if (!roots.next (&next)) break; if (!roots.next (&next)) break;
@ -661,8 +661,8 @@ struct graph_t
auto new_subgraph = auto new_subgraph =
+ subgraph.keys () + subgraph.keys ()
| hb_map([&] (unsigned node_idx) { | hb_map([&] (uint32_t node_idx) {
const unsigned *v; const uint32_t *v;
if (index_map.has (node_idx, &v)) return *v; if (index_map.has (node_idx, &v)) return *v;
return node_idx; return node_idx;
}) })
@ -672,10 +672,10 @@ struct graph_t
remap_obj_indices (index_map, parents.iter (), true); remap_obj_indices (index_map, parents.iter (), true);
// Update roots set with new indices as needed. // 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)) while (roots.next (&next))
{ {
const unsigned *v; const uint32_t *v;
if (index_map.has (next, &v)) if (index_map.has (next, &v))
{ {
roots.del (next); roots.del (next);
@ -690,7 +690,7 @@ struct graph_t
{ {
for (const auto& link : vertices_[node_idx].obj.all_links ()) for (const auto& link : vertices_[node_idx].obj.all_links ())
{ {
const unsigned *v; const uint32_t *v;
if (subgraph.has (link.objidx, &v)) if (subgraph.has (link.objidx, &v))
{ {
subgraph.set (link.objidx, *v + 1); subgraph.set (link.objidx, *v + 1);
@ -1183,7 +1183,7 @@ struct graph_t
{ {
for (auto& link : vertices_[i].obj.all_links_writer ()) 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 (!id_map.has (link.objidx, &v)) continue;
if (only_wide && !(link.width == 4 && !link.is_signed)) continue; if (only_wide && !(link.width == 4 && !link.is_signed)) continue;

View File

@ -1079,7 +1079,7 @@ struct LangSys
auto *out = c->serializer->start_embed (*this); auto *out = c->serializer->start_embed (*this);
if (unlikely (!out || !c->serializer->extend_min (out))) return_trace (false); 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; out->reqFeatureIndex = l->feature_index_map->has (reqFeatureIndex, &v) ? *v : 0xFFFFu;
if (!l->visitFeatureIndex (featureIndex.len)) if (!l->visitFeatureIndex (featureIndex.len))
@ -1548,7 +1548,7 @@ struct ClassDefFormat1_3
startGlyph = glyph_min; startGlyph = glyph_min;
if (unlikely (!classValue.serialize (c, glyph_count))) return_trace (false); if (unlikely (!classValue.serialize (c, glyph_count))) return_trace (false);
for (const hb_pair_t<hb_codepoint_t, unsigned> gid_klass_pair : + it) for (const hb_pair_t<hb_codepoint_t, uint32_t> gid_klass_pair : + it)
{ {
unsigned idx = gid_klass_pair.first - glyph_min; unsigned idx = gid_klass_pair.first - glyph_min;
classValue[idx] = gid_klass_pair.second; classValue[idx] = gid_klass_pair.second;
@ -1675,11 +1675,11 @@ struct ClassDefFormat1_3
if (klass == 0) if (klass == 0)
{ {
unsigned start_glyph = startGlyph; 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;) hb_set_next (glyphs, &g) && g < start_glyph;)
intersect_glyphs->add (g); intersect_glyphs->add (g);
for (unsigned g = startGlyph + count - 1; for (uint32_t g = startGlyph + count - 1;
hb_set_next (glyphs, &g);) hb_set_next (glyphs, &g);)
intersect_glyphs->add (g); intersect_glyphs->add (g);

View File

@ -78,14 +78,14 @@ HB_INTERNAL bool postV2Tail::subset (hb_subset_context_t *c) const
post::accelerator_t _post (c->plan->source); post::accelerator_t _post (c->plan->source);
hb_hashmap_t<hb_bytes_t, unsigned, true> glyph_name_to_new_index; hb_hashmap_t<hb_bytes_t, uint32_t, true> glyph_name_to_new_index;
for (hb_codepoint_t new_gid = 0; new_gid < num_glyphs; new_gid++) for (hb_codepoint_t new_gid = 0; new_gid < num_glyphs; new_gid++)
{ {
hb_codepoint_t old_gid = reverse_glyph_map.get (new_gid); hb_codepoint_t old_gid = reverse_glyph_map.get (new_gid);
unsigned old_index = glyphNameIndex[old_gid]; unsigned old_index = glyphNameIndex[old_gid];
unsigned new_index; unsigned new_index;
const unsigned *new_index2; const uint32_t *new_index2;
if (old_index <= 257) new_index = old_index; if (old_index <= 257) new_index = old_index;
else if (old_new_index_map.has (old_index, &new_index2)) else if (old_new_index_map.has (old_index, &new_index2))
{ {

View File

@ -59,7 +59,7 @@ struct InstanceRecord
const hb_hashmap_t<hb_tag_t, float> *axes_location = c->plan->user_axes_location; const hb_hashmap_t<hb_tag_t, float> *axes_location = c->plan->user_axes_location;
for (unsigned i = 0 ; i < axis_count; i++) for (unsigned i = 0 ; i < axis_count; i++)
{ {
unsigned *axis_tag; uint32_t *axis_tag;
// only keep instances whose coordinates == pinned axis location // only keep instances whose coordinates == pinned axis location
if (!c->plan->axes_old_index_tag_map->has (i, &axis_tag)) continue; if (!c->plan->axes_old_index_tag_map->has (i, &axis_tag)) continue;

View File

@ -209,7 +209,7 @@ bool _try_isolating_subgraphs (const hb_vector_t<graph::overflow_record_t>& over
// Only move at most half of the roots in a space at a time. // Only move at most half of the roots in a space at a time.
unsigned extra = roots_to_isolate.get_population () - maximum_to_move; unsigned extra = roots_to_isolate.get_population () - maximum_to_move;
while (extra--) { while (extra--) {
unsigned root = HB_SET_VALUE_INVALID; uint32_t root = HB_SET_VALUE_INVALID;
roots_to_isolate.previous (&root); roots_to_isolate.previous (&root);
roots_to_isolate.del (root); roots_to_isolate.del (root);
} }