More -Wcast-error fix
This commit is contained in:
parent
447323b85a
commit
83d4aa5ca9
|
@ -236,10 +236,13 @@ hb_ctz (T v)
|
|||
template <typename T>
|
||||
static inline T* hb_addressof (T& arg)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
/* https://en.cppreference.com/w/cpp/memory/addressof */
|
||||
return reinterpret_cast<T*>(
|
||||
&const_cast<char&>(
|
||||
reinterpret_cast<const volatile char&>(arg)));
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
/* ASCII tag/character handling */
|
||||
|
|
Loading…
Reference in New Issue