Completely revert the thing back

This commit is contained in:
Behdad Esfahbod 2019-05-15 01:12:04 -07:00
parent c58eeb5fb3
commit e1b2edb04a
1 changed files with 5 additions and 9 deletions

View File

@ -279,15 +279,6 @@ struct OffsetTo : Offset<OffsetType, has_null>
return StructAtOffset<Type> (base, *this); return StructAtOffset<Type> (base, *this);
} }
template <typename Base>
friend const Type& operator + (const Base &base, const OffsetTo &offset) { return offset (base); }
template <typename Base>
friend const Type& operator + (const OffsetTo &offset, const Base &base) { return offset (base); }
template <typename Base>
friend Type& operator + (Base &base, OffsetTo &offset) { return offset (base); }
template <typename Base>
friend Type& operator + (OffsetTo &offset, Base &base) { return offset (base); }
Type& serialize (hb_serialize_context_t *c, const void *base) Type& serialize (hb_serialize_context_t *c, const void *base)
{ {
return * (Type *) Offset<OffsetType>::serialize (c, base); return * (Type *) Offset<OffsetType>::serialize (c, base);
@ -366,6 +357,11 @@ using NNOffsetTo = OffsetTo<Type, OffsetType, false>;
template <typename Type> template <typename Type>
using LNNOffsetTo = LOffsetTo<Type, false>; using LNNOffsetTo = LOffsetTo<Type, false>;
template <typename Base, typename OffsetType, bool has_null, typename Type>
static inline const Type& operator + (const Base &base, const OffsetTo<Type, OffsetType, has_null> &offset) { return offset (base); }
template <typename Base, typename OffsetType, bool has_null, typename Type>
static inline Type& operator + (Base &base, OffsetTo<Type, OffsetType, has_null> &offset) { return offset (base); }
/* /*
* Array Types * Array Types