From 381c3548e9022a421bcf88db148cc11f337f3b79 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 17 Dec 2018 00:39:30 -0500 Subject: [PATCH] [array] Add cast operator to add const to Type In lieu of constructor removed in previous commit. --- src/hb-array.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hb-array.hh b/src/hb-array.hh index 59d28558a..e0400e5d3 100644 --- a/src/hb-array.hh +++ b/src/hb-array.hh @@ -61,6 +61,7 @@ struct hb_array_t explicit_operator bool (void) const { return len; } Type * operator & (void) const { return arrayZ; } Type & operator * (void) { return (this->operator [])[0]; } + operator hb_array_t (void) { return hb_array_t (arrayZ, len); } template operator T * (void) const { return arrayZ; } hb_array_t & operator += (unsigned int count)