Add const OffsetTo<> dereference

Unused, but now that we have CrapPool, implement it.
pull/1043/head
Behdad Esfahbod 7 years ago
parent 2baa357ac7
commit dcd1b07eea
  1. 6
      src/hb-open-type-private.hh

@ -779,6 +779,12 @@ struct OffsetTo : Offset<OffsetType>
{
unsigned int offset = *this;
if (unlikely (!offset)) return Null(Type);
return StructAtOffset<const Type> (base, offset);
}
inline Type& operator () (void *base) const
{
unsigned int offset = *this;
if (unlikely (!offset)) return Crap(Type);
return StructAtOffset<Type> (base, offset);
}

Loading…
Cancel
Save