Minor
This commit is contained in:
parent
f424a34223
commit
9daa88cd79
|
@ -184,6 +184,17 @@ struct hb_set_t
|
||||||
hb_prealloced_array_t<page_map_t, 8> page_map;
|
hb_prealloced_array_t<page_map_t, 8> page_map;
|
||||||
hb_prealloced_array_t<page_t, 8> pages;
|
hb_prealloced_array_t<page_t, 8> pages;
|
||||||
|
|
||||||
|
inline void init (void)
|
||||||
|
{
|
||||||
|
page_map.init ();
|
||||||
|
pages.init ();
|
||||||
|
}
|
||||||
|
inline void finish (void)
|
||||||
|
{
|
||||||
|
page_map.finish ();
|
||||||
|
pages.finish ();
|
||||||
|
}
|
||||||
|
|
||||||
inline bool resize (unsigned int count)
|
inline bool resize (unsigned int count)
|
||||||
{
|
{
|
||||||
if (unlikely (in_error)) return false;
|
if (unlikely (in_error)) return false;
|
||||||
|
|
|
@ -45,8 +45,7 @@ hb_set_create (void)
|
||||||
if (!(set = hb_object_create<hb_set_t> ()))
|
if (!(set = hb_object_create<hb_set_t> ()))
|
||||||
return hb_set_get_empty ();
|
return hb_set_get_empty ();
|
||||||
|
|
||||||
set->page_map.init ();
|
set->init ();
|
||||||
set->pages.init ();
|
|
||||||
|
|
||||||
return set;
|
return set;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +95,7 @@ hb_set_destroy (hb_set_t *set)
|
||||||
{
|
{
|
||||||
if (!hb_object_destroy (set)) return;
|
if (!hb_object_destroy (set)) return;
|
||||||
|
|
||||||
set->page_map.finish ();
|
set->finish ();
|
||||||
set->pages.finish ();
|
|
||||||
|
|
||||||
free (set);
|
free (set);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue