From a728c63a98281fd4a0661e17fc01171bc3205b27 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 20 Dec 2018 23:15:49 -0500 Subject: [PATCH] [vector] Add operator bool --- src/hb-vector.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 0d98bd0..b4175c5 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -89,6 +89,8 @@ struct hb_vector_t return arrayZ()[i]; } + explicit_operator bool () const { return len; } + hb_array_t as_array () { return hb_array (arrayZ(), len); } hb_array_t as_array () const -- 2.7.4