diff options
author | Chris Robinson <[email protected]> | 2018-12-28 16:13:28 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-28 16:13:28 -0800 |
commit | 67b874328d60062558eeb5068a3f79dab2b6f7e3 (patch) | |
tree | 39a560044c569a5b53c910241ef1917333a107cd /common/almalloc.h | |
parent | 01ed98c99bc66f4df589d73c3ec9e97c9387d4f7 (diff) |
Use static_cast instead of reinterpret_cast where possible
Diffstat (limited to 'common/almalloc.h')
-rw-r--r-- | common/almalloc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/almalloc.h b/common/almalloc.h index 7ec07004..26fa37ee 100644 --- a/common/almalloc.h +++ b/common/almalloc.h @@ -73,7 +73,7 @@ inline T* assume_aligned(T *ptr) noexcept { static_assert((alignment & (alignment-1)) == 0, "alignment must be a power of 2"); #ifdef __GNUC__ - return reinterpret_cast<T*>(__builtin_assume_aligned(ptr, alignment)); + return static_cast<T*>(__builtin_assume_aligned(ptr, alignment)); #elif defined(_MSC_VER) auto ptrval = reinterpret_cast<uintptr_t>(ptr); if((ptrval&(alignment-1)) != 0) __assume(0); |