[saitnize] Minor

This commit is contained in:
Behdad Esfahbod 2018-12-19 21:07:53 -05:00
parent 3ee4ea9456
commit 5000a59a63
1 changed files with 4 additions and 2 deletions

View File

@ -386,8 +386,10 @@ struct hb_sanitize_context_t :
} }
template <typename Type, typename ValueType> template <typename Type, typename ValueType>
bool try_set (const Type *obj, const ValueType &v) { bool try_set (const Type *obj, const ValueType &v)
if (this->may_edit (obj, obj->static_size)) { {
if (this->may_edit (obj, hb_static_size (Type)))
{
const_cast<Type *> (obj)->set (v); const_cast<Type *> (obj)->set (v);
return true; return true;
} }