Add CHECK_NO_RETURN for checks in code that should continue function execution
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user