diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2018-11-30 19:49:03 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2018-11-30 19:49:03 -0500 |
commit | db56d481cdfe848240d0f009656d290cf7e63d14 (patch) | |
tree | 33865f2264fac3f77e798400a5109c1c29d2430d | |
parent | 51977fb38f73ea3ef9ae436353208de828ec6141 (diff) | |
download | harfbuzz-overload-overload.tar.gz |
Another approach to fixing pesky-gcc's ambiguous overload overloadoverload-overload
-rw-r--r-- | src/hb-vector.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 313c24c4..ef9d99d5 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -90,6 +90,9 @@ struct hb_vector_t return Null(Type); return arrayZ()[i]; } + /* Catch int index and deflect to unsigned int. */ + inline Type& operator [] (int i) { return (*this)[(unsigned int) i]; } + inline const Type& operator [] (int i) const { return (*this)[(unsigned int) i]; } inline hb_array_t<Type> as_array (void) { return hb_array (arrayZ(), len); } |