[serializer] Don't memset memory in embed

Not necessary.
This commit is contained in:
Behdad Esfahbod 2022-12-01 14:23:25 -07:00
parent 3b68c7146f
commit 0b826368fd
1 changed files with 1 additions and 1 deletions

View File

@ -595,7 +595,7 @@ struct hb_serialize_context_t
Type *embed (const Type *obj) Type *embed (const Type *obj)
{ {
unsigned int size = obj->get_size (); unsigned int size = obj->get_size ();
Type *ret = this->allocate_size<Type> (size); Type *ret = this->allocate_size<Type> (size, false);
if (unlikely (!ret)) return nullptr; if (unlikely (!ret)) return nullptr;
hb_memcpy (ret, obj, size); hb_memcpy (ret, obj, size);
return ret; return ret;