[object] Call constructor
This commit is contained in:
parent
61c0438425
commit
9ea4ab6051
|
@ -1675,6 +1675,7 @@ _hb_font_create (hb_face_t *face)
|
|||
|
||||
if (unlikely (!face))
|
||||
face = hb_face_get_empty ();
|
||||
|
||||
if (!(font = hb_object_create<hb_font_t> ()))
|
||||
return hb_font_get_empty ();
|
||||
|
||||
|
|
|
@ -56,8 +56,6 @@ hb_map_create ()
|
|||
if (!(map = hb_object_create<hb_map_t> ()))
|
||||
return hb_map_get_empty ();
|
||||
|
||||
map->init_shallow ();
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
@ -459,8 +459,6 @@ hb_hashmap_t<K, V>* hb_hashmap_create ()
|
|||
if (!(map = hb_object_create<hashmap> ()))
|
||||
return nullptr;
|
||||
|
||||
map->init_shallow ();
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
@ -222,8 +222,11 @@ static inline Type *hb_object_create ()
|
|||
if (unlikely (!obj))
|
||||
return obj;
|
||||
|
||||
new (obj) Type;
|
||||
|
||||
hb_object_init (obj);
|
||||
hb_object_trace (obj, HB_FUNC);
|
||||
|
||||
return obj;
|
||||
}
|
||||
template <typename Type>
|
||||
|
|
|
@ -56,8 +56,6 @@ hb_set_create ()
|
|||
if (!(set = hb_object_create<hb_set_t> ()))
|
||||
return hb_set_get_empty ();
|
||||
|
||||
set->init_shallow ();
|
||||
|
||||
return set;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue