mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-14 17:13:40 +00:00
[graph] Minor assert
This commit is contained in:
parent
07e7033076
commit
3b386c3773
1 changed files with 4 additions and 0 deletions
|
@ -271,6 +271,7 @@ struct graph_t
|
|||
{
|
||||
if (single_parent != (unsigned) -1)
|
||||
{
|
||||
assert (single_parent < id_map.length);
|
||||
single_parent = id_map[single_parent];
|
||||
return;
|
||||
}
|
||||
|
@ -278,7 +279,10 @@ struct graph_t
|
|||
hb_hashmap_t<unsigned, unsigned> new_parents;
|
||||
new_parents.alloc (parents.get_population ());
|
||||
for (auto _ : parents)
|
||||
{
|
||||
assert (_.first < id_map.length);
|
||||
new_parents.set (id_map[_.first], _.second);
|
||||
}
|
||||
|
||||
if (!new_parents.in_error ())
|
||||
parents = std::move (new_parents);
|
||||
|
|
Loading…
Add table
Reference in a new issue