diff --git a/Include/auROXTL/auAtomic.hpp b/Include/auROXTL/auAtomic.hpp index 4709c03..b8be2cf 100644 --- a/Include/auROXTL/auAtomic.hpp +++ b/Include/auROXTL/auAtomic.hpp @@ -428,6 +428,11 @@ inline auline T AuAtomicUtils::LoadWeak(T *in) template inline auline T AuAtomicUtils::Load(T *in) { + if constexpr (AuIsPointer_v) + { + return (T)AuAtomicUtils::Load((AuUInt *)in); + } + #if defined(AURORA_COMPILER_MSVC) && (defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86)) const auto read = *in; ::_ReadWriteBarrier(); @@ -486,6 +491,12 @@ inline auline T AuAtomicUtils::Load(T *in) template inline auline void AuAtomicUtils::Store(T *in, T val) { + if constexpr (AuIsPointer_v) + { + AuAtomicUtils::Store((AuUInt *)in, (AuUInt)val); + return; + } + #if defined(AURORA_COMPILER_MSVC) && (defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86)) *in = val; #elif defined(AURORA_COMPILER_MSVC)