[blob] Add as_bytes()

This commit is contained in:
Behdad Esfahbod 2018-08-24 10:29:45 -07:00
parent 29a9a08838
commit 6cac9dc9cc
1 changed files with 4 additions and 0 deletions

View File

@ -62,6 +62,10 @@ struct hb_blob_t
{
return unlikely (!data) ? &Null(Type) : reinterpret_cast<const Type *> (data);
}
inline hb_bytes_t as_bytes (void) const
{
return hb_bytes_t (data, length);
}
public:
hb_object_header_t header;