From dfeeae4687b6c98b1589985e5cb21f0df05a0631 Mon Sep 17 00:00:00 2001 From: Reece Wilson Date: Tue, 13 Sep 2022 15:51:23 +0100 Subject: [PATCH] [*] amend destroy atomic exchange and an operators linkage --- Include/auROXTL/AU_MACROS.hpp | 6 +++--- Include/auROXTL/Objects/SafeDestroy.hpp | 4 ++-- Include/auROXTL/auTryConstruct.hpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Include/auROXTL/AU_MACROS.hpp b/Include/auROXTL/AU_MACROS.hpp index 5e1409c..d22f207 100644 --- a/Include/auROXTL/AU_MACROS.hpp +++ b/Include/auROXTL/AU_MACROS.hpp @@ -58,7 +58,7 @@ \ struct CppDeleter ## name \ { \ - void operator()(type *t) \ + inline void operator()(type *t) \ { \ if (!t) return; \ name ## Release(t); \ @@ -150,12 +150,12 @@ struct AuStringException : std::exception { - inline AuStringException (const char *str) : pNullString(str) + inline AuStringException(const char *str) : pNullString(str) { } - const char *what() const noexcept override + inline const char *what() const noexcept override { return pNullString; } diff --git a/Include/auROXTL/Objects/SafeDestroy.hpp b/Include/auROXTL/Objects/SafeDestroy.hpp index dc91a8e..4ddf90f 100644 --- a/Include/auROXTL/Objects/SafeDestroy.hpp +++ b/Include/auROXTL/Objects/SafeDestroy.hpp @@ -57,7 +57,7 @@ public: \ if (uCurrentState & 2) return; \ uEndState |= 2; \ } \ - while (AuAtomicCompareExchange(&this->uCurrentState_, uEndState, uCurrentState) != uEndState); \ + while (AuAtomicCompareExchange(&this->uCurrentState_, uEndState, uCurrentState) != uCurrentState); \ \ type :: _TryPreDeconstruct(this); \ \ @@ -77,7 +77,7 @@ public: \ if (uCurrentState & 1) return; \ uEndState |= 1; \ } \ - while (AuAtomicCompareExchange(&this->uCurrentState_, uEndState, uCurrentState) != uEndState); \ + while (AuAtomicCompareExchange(&this->uCurrentState_, uEndState, uCurrentState) != uCurrentState); \ \ type :: _TryDeconstructPrivate(this); \ } \ diff --git a/Include/auROXTL/auTryConstruct.hpp b/Include/auROXTL/auTryConstruct.hpp index fc612a0..8ab4934 100644 --- a/Include/auROXTL/auTryConstruct.hpp +++ b/Include/auROXTL/auTryConstruct.hpp @@ -27,7 +27,7 @@ struct AuCtorCode_t : AuCtorErrorTag inline constexpr AuCtorCode_t(bool val) : value(val) {}; - explicit operator bool() const + explicit inline operator bool() const { return value; }