projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15acf33
)
[array] Add cast operator to add const to Type
author
Behdad Esfahbod
<behdad@behdad.org>
Mon, 17 Dec 2018 05:39:30 +0000
(
00:39
-0500)
committer
Behdad Esfahbod
<behdad@behdad.org>
Mon, 17 Dec 2018 05:39:30 +0000
(
00:39
-0500)
In lieu of constructor removed in previous commit.
src/hb-array.hh
patch
|
blob
|
history
diff --git
a/src/hb-array.hh
b/src/hb-array.hh
index
59d2855
..
e0400e5
100644
(file)
--- 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<const Type> (void) { return hb_array_t<const Type> (arrayZ, len); }
template <typename T> operator T * (void) const { return arrayZ; }
hb_array_t<Type> & operator += (unsigned int count)