[map] Another try at fixing old Mac builds

Maybe fixes https://github.com/harfbuzz/harfbuzz/issues/4138
This commit is contained in:
Behdad Esfahbod 2023-03-02 09:50:38 -07:00
parent 67e01c1292
commit be64cae164
3 changed files with 4 additions and 16 deletions

View File

@ -399,7 +399,7 @@ void
hb_map_keys (const hb_map_t *map,
hb_set_t *keys)
{
map->keys (*keys);
hb_copy (map->keys() , *keys);
}
/**
@ -415,5 +415,5 @@ void
hb_map_values (const hb_map_t *map,
hb_set_t *values)
{
map->values (*values);
hb_copy (map->values() , *values);
}

View File

@ -317,18 +317,6 @@ struct hb_hashmap_t
hb_copy (other, *this);
}
template <typename Iterable>
void keys (Iterable &keys_) const
{
hb_copy (keys() , keys_);
}
template <typename Iterable>
void values (Iterable &values_) const
{
hb_copy (values() , values_);
}
/*
* Iterator
*/

View File

@ -344,8 +344,8 @@ main (int argc, char **argv)
hb_set_t keys;
hb_set_t values;
m.keys (keys);
m.values (values);
hb_copy (m.keys (), keys);
hb_copy (m.values (), values);
assert (keys.is_equal (hb_set_t ({1, 2, 3, 4, 5, 6})));
assert (values.is_equal (hb_set_t ({1, 1, 2, 3, 5, 8})));