Add CHECK_NO_RETURN for checks in code that should continue function execution

This commit is contained in:
2026-06-02 15:54:00 +02:00
parent 44117084c8
commit 24654e5b02
2 changed files with 9 additions and 3 deletions
@@ -243,9 +243,9 @@ FlaxStorage::~FlaxStorage()
{
// Validate if has been disposed
ASSERT(IsDisposed());
CHECK(_chunksLock == 0);
CHECK(_refCount == 0);
CHECK(_isUnloadingData == 0);
CHECK_NO_RETURN(_chunksLock == 0);
CHECK_NO_RETURN(_refCount == 0);
CHECK_NO_RETURN(_isUnloadingData == 0);
ASSERT(_chunks.IsEmpty());
#if USE_EDITOR
+6
View File
@@ -75,6 +75,12 @@
Platform::CheckFailed(#expression, __FILE__, __LINE__); \
return returnValue; \
}
// Performs a soft check of the expression. Logs the expression failure and continues execution.
#define CHECK_NO_RETURN(expression) \
if (!(expression)) \
{ \
Platform::CheckFailed(#expression, __FILE__, __LINE__); \
}
#if ENABLE_ASSERTION
// Performs a soft check of the expression. Logs the expression failure and returns from the function call.