[*] amend destroy atomic exchange and an operators linkage
This commit is contained in:
parent
d1b18efcaa
commit
dfeeae4687
@ -58,7 +58,7 @@
|
|||||||
\
|
\
|
||||||
struct CppDeleter ## name \
|
struct CppDeleter ## name \
|
||||||
{ \
|
{ \
|
||||||
void operator()(type *t) \
|
inline void operator()(type *t) \
|
||||||
{ \
|
{ \
|
||||||
if (!t) return; \
|
if (!t) return; \
|
||||||
name ## Release(t); \
|
name ## Release(t); \
|
||||||
@ -150,12 +150,12 @@
|
|||||||
|
|
||||||
struct AuStringException : std::exception
|
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;
|
return pNullString;
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ public: \
|
|||||||
if (uCurrentState & 2) return; \
|
if (uCurrentState & 2) return; \
|
||||||
uEndState |= 2; \
|
uEndState |= 2; \
|
||||||
} \
|
} \
|
||||||
while (AuAtomicCompareExchange(&this->uCurrentState_, uEndState, uCurrentState) != uEndState); \
|
while (AuAtomicCompareExchange(&this->uCurrentState_, uEndState, uCurrentState) != uCurrentState); \
|
||||||
\
|
\
|
||||||
type :: _TryPreDeconstruct<type>(this); \
|
type :: _TryPreDeconstruct<type>(this); \
|
||||||
\
|
\
|
||||||
@ -77,7 +77,7 @@ public: \
|
|||||||
if (uCurrentState & 1) return; \
|
if (uCurrentState & 1) return; \
|
||||||
uEndState |= 1; \
|
uEndState |= 1; \
|
||||||
} \
|
} \
|
||||||
while (AuAtomicCompareExchange(&this->uCurrentState_, uEndState, uCurrentState) != uEndState); \
|
while (AuAtomicCompareExchange(&this->uCurrentState_, uEndState, uCurrentState) != uCurrentState); \
|
||||||
\
|
\
|
||||||
type :: _TryDeconstructPrivate<type>(this); \
|
type :: _TryDeconstructPrivate<type>(this); \
|
||||||
} \
|
} \
|
||||||
|
@ -27,7 +27,7 @@ struct AuCtorCode_t : AuCtorErrorTag
|
|||||||
inline constexpr AuCtorCode_t(bool val) : value(val)
|
inline constexpr AuCtorCode_t(bool val) : value(val)
|
||||||
{};
|
{};
|
||||||
|
|
||||||
explicit operator bool() const
|
explicit inline operator bool() const
|
||||||
{
|
{
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user