Allow rvalues in hb_addressof()
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 9 Jan 2019 08:36:26 +0000 (00:36 -0800)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 21 Jan 2019 01:12:12 +0000 (20:12 -0500)
src/hb-dsalgs.hh

index a7d9616..b5abb6d 100644 (file)
@@ -250,7 +250,7 @@ hb_ctz (T v)
  */
 
 template <typename T>
-static inline T* hb_addressof (T& arg)
+static inline T* hb_addressof (const T& arg)
 {
   /* https://en.cppreference.com/w/cpp/memory/addressof */
   return reinterpret_cast<T*>(