提交 9daa88cd 编写于 作者: B Behdad Esfahbod

Minor

上级 f424a342
......@@ -184,6 +184,17 @@ struct hb_set_t
hb_prealloced_array_t<page_map_t, 8> page_map;
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)
{
if (unlikely (in_error)) return false;
......
......@@ -45,8 +45,7 @@ hb_set_create (void)
if (!(set = hb_object_create<hb_set_t> ()))
return hb_set_get_empty ();
set->page_map.init ();
set->pages.init ();
set->init ();
return set;
}
......@@ -96,8 +95,7 @@ hb_set_destroy (hb_set_t *set)
{
if (!hb_object_destroy (set)) return;
set->page_map.finish ();
set->pages.finish ();
set->finish ();
free (set);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册