From 203ea58bf67b3df3e376f94cdfb37382dd3858a0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 15 May 2019 16:14:40 -0700 Subject: [PATCH] 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. --- src/hb-open-type.hh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index ec7b5db89..ee2723aad 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -279,10 +279,12 @@ struct OffsetTo : Offset return StructAtOffset (base, *this); } - template - friend const Type& operator + (const Base &base, const OffsetTo &offset) { return offset (base); } - template - friend Type& operator + (Base &base, OffsetTo &offset) { return offset (base); } + template + friend const Type& operator + (const Base &base, const OffsetTo &offset) { return offset ((const void *) base); } + template + friend Type& operator + (Base &&base, OffsetTo &offset) { return offset ((void *) base); } Type& serialize (hb_serialize_context_t *c, const void *base) {