From 67b874328d60062558eeb5068a3f79dab2b6f7e3 Mon Sep 17 00:00:00 2001 From: Chris Robinson <chris.kcat@gmail.com> Date: Fri, 28 Dec 2018 16:13:28 -0800 Subject: Use static_cast instead of reinterpret_cast where possible --- common/almalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/almalloc.h') 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); -- cgit v1.2.3