From 779e884cafab17f002f0995b23d55d3be1b4538a Mon Sep 17 00:00:00 2001 From: J Reece Wilson Date: Thu, 21 Mar 2024 00:34:00 +0000 Subject: [PATCH] [*] Clang build fix --- Include/auROXTL/auAtomic.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Include/auROXTL/auAtomic.hpp b/Include/auROXTL/auAtomic.hpp index b8be2cf..2512cca 100644 --- a/Include/auROXTL/auAtomic.hpp +++ b/Include/auROXTL/auAtomic.hpp @@ -432,7 +432,8 @@ inline auline T AuAtomicUtils::Load(T *in) { return (T)AuAtomicUtils::Load((AuUInt *)in); } - + else + { #if defined(AURORA_COMPILER_MSVC) && (defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86)) const auto read = *in; ::_ReadWriteBarrier(); @@ -477,7 +478,7 @@ inline auline T AuAtomicUtils::Load(T *in) else if constexpr (AuIsSame_v) { return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuInt64) *)(in), __ATOMIC_ACQUIRE); -} + } else { static_assert(AuIsVoid_v, "T"); @@ -486,6 +487,7 @@ inline auline T AuAtomicUtils::Load(T *in) return __sync_val_compare_and_swap(*in, 0, 0); #endif #endif + } } template @@ -496,7 +498,8 @@ inline auline void AuAtomicUtils::Store(T *in, T val) AuAtomicUtils::Store((AuUInt *)in, (AuUInt)val); return; } - + else + { #if defined(AURORA_COMPILER_MSVC) && (defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86)) *in = val; #elif defined(AURORA_COMPILER_MSVC) @@ -582,6 +585,7 @@ inline auline void AuAtomicUtils::Store(T *in, T val) __sync_synchronize(); #endif #endif + } } template <>