From 91de9dfcf3bba7cbeef1e709679c8e24ab684c97 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 2 Nov 2018 12:14:21 -0400 Subject: [PATCH] Fix &array_of<> --- src/hb-dsalgs.hh | 3 +++ src/hb-open-type.hh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh index c1b0a86a8..f2bff063d 100644 --- a/src/hb-dsalgs.hh +++ b/src/hb-dsalgs.hh @@ -556,6 +556,9 @@ struct hb_array_t template inline operator T * (void) { return arrayZ; } template inline operator const T * (void) const { return arrayZ; } + inline Type * operator & (void) { return arrayZ; } + inline const Type * operator & (void) const { return arrayZ; } + inline hb_array_t sub_array (unsigned int start_offset, unsigned int seg_count) const { unsigned int count = len; diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index 7bce7eade..afd75be4d 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -340,7 +340,7 @@ struct UnsizedArrayOf inline const Type& operator [] (unsigned int i) const { return arrayZ[i]; } inline Type& operator [] (unsigned int i) { return arrayZ[i]; } - template inline operator T * (void) { return arrayZ; } + template inline operator T * (void) { return arrayZ; } template inline operator const T * (void) const { return arrayZ; } inline unsigned int get_size (unsigned int len) const @@ -452,7 +452,7 @@ struct ArrayOf return arrayZ[i]; } - template inline operator T * (void) { return arrayZ; } + template inline operator T * (void) { return arrayZ; } template inline operator const T * (void) const { return arrayZ; } inline unsigned int get_size (void) const