mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 00:11:14 +01:00
More adjustment to OffsetTo<>::friend opeator+
Let's see if I break any bots. But yeah, it wasn't accepting a non-const pointer. It just happens that we don't use that in the code it seems.
This commit is contained in:
1 parent
ebf47a95f2
commit
203ea58bf6
1 file changed
+6
-4
+6
-4
@@ -279,10 +279,12 @@ struct OffsetTo : Offset<OffsetType, has_null>
|
||||
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 Type& operator + (Base &base, OffsetTo &offset) { return offset (base); }
|
||||
template <typename Base,
|
||||
hb_enable_if (hb_is_convertible (const Base, const void *))>
|
||||
friend const Type& operator + (const Base &base, const OffsetTo &offset) { return offset ((const void *) base); }
|
||||
template <typename Base,
|
||||
hb_enable_if (hb_is_convertible (Base, void *))>
|
||||
friend Type& operator + (Base &&base, OffsetTo &offset) { return offset ((void *) base); }
|
||||
|
||||
Type& serialize (hb_serialize_context_t *c, const void *base)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user