parent
3b28cff9c0
commit
efa2a5796e
|
@ -453,6 +453,7 @@ hb_icu_script_to_script
|
||||||
HB_MAP_VALUE_INVALID
|
HB_MAP_VALUE_INVALID
|
||||||
hb_map_allocation_successful
|
hb_map_allocation_successful
|
||||||
hb_map_clear
|
hb_map_clear
|
||||||
|
hb_map_copy
|
||||||
hb_map_create
|
hb_map_create
|
||||||
hb_map_del
|
hb_map_del
|
||||||
hb_map_destroy
|
hb_map_destroy
|
||||||
|
|
|
@ -172,6 +172,25 @@ hb_map_allocation_successful (const hb_map_t *map)
|
||||||
return map->successful;
|
return map->successful;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hb_map_copy:
|
||||||
|
* @map: A map
|
||||||
|
*
|
||||||
|
* Allocate a copy of @map.
|
||||||
|
*
|
||||||
|
* Return value: Newly-allocated map.
|
||||||
|
*
|
||||||
|
* Since: REPLACEME
|
||||||
|
**/
|
||||||
|
hb_map_t *
|
||||||
|
hb_map_copy (const hb_map_t *map)
|
||||||
|
{
|
||||||
|
hb_map_t *copy = hb_map_create ();
|
||||||
|
if (unlikely (!copy)) return nullptr;
|
||||||
|
copy->resize (map->population);
|
||||||
|
hb_copy (*map, *copy);
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hb_map_set:
|
* hb_map_set:
|
||||||
|
|
|
@ -82,6 +82,9 @@ hb_map_get_user_data (hb_map_t *map,
|
||||||
HB_EXTERN hb_bool_t
|
HB_EXTERN hb_bool_t
|
||||||
hb_map_allocation_successful (const hb_map_t *map);
|
hb_map_allocation_successful (const hb_map_t *map);
|
||||||
|
|
||||||
|
HB_EXTERN hb_map_t *
|
||||||
|
hb_map_copy (const hb_map_t *map);
|
||||||
|
|
||||||
HB_EXTERN void
|
HB_EXTERN void
|
||||||
hb_map_clear (hb_map_t *map);
|
hb_map_clear (hb_map_t *map);
|
||||||
|
|
||||||
|
|
|
@ -186,6 +186,7 @@ hb_set_t *
|
||||||
hb_set_copy (const hb_set_t *set)
|
hb_set_copy (const hb_set_t *set)
|
||||||
{
|
{
|
||||||
hb_set_t *copy = hb_set_create ();
|
hb_set_t *copy = hb_set_create ();
|
||||||
|
if (unlikely (!copy)) return nullptr;
|
||||||
copy->set (*set);
|
copy->set (*set);
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue