From 7883e5d8ad0a78184289271e5cf0b3e8ac084c40 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Thu, 2 Jul 2020 13:28:58 -0700 Subject: [PATCH] Fix cast order of operations --- core/Utils.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Utils.hpp b/core/Utils.hpp index 46e7dcb0f..a1ec4da9e 100644 --- a/core/Utils.hpp +++ b/core/Utils.hpp @@ -103,7 +103,7 @@ extern const uint64_t s_mapNonce; static ZT_INLINE void memoryLock(const void *const p, const unsigned int l) noexcept { #ifdef __WINDOWS__ - VirtualLock(const_cast(reinterpret_cast(p)), l); + VirtualLock(reinterpret_cast(const_cast(p)), l); #else mlock(p, l); #endif @@ -118,7 +118,7 @@ static ZT_INLINE void memoryLock(const void *const p, const unsigned int l) noex static ZT_INLINE void memoryUnlock(const void *const p, const unsigned int l) noexcept { #ifdef __WINDOWS__ - VirtualUnlock(const_cast(reinterpret_cast(p)), l); + VirtualUnlock(reinterpret_cast(const_cast(p)), l); #else munlock(p, l); #endif