2019-06-26 22:11:22 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cassert>
|
|
|
|
|
|
|
|
//#define ALLOW_ASSERT
|
|
|
|
#ifdef ALLOW_ASSERT
|
2020-01-24 02:49:59 +01:00
|
|
|
#define sassert(exp) assert(exp)
|
2019-06-26 22:11:22 +02:00
|
|
|
#else
|
2020-01-24 02:49:59 +01:00
|
|
|
#define S(s) #s
|
2021-02-06 21:00:05 +01:00
|
|
|
#define sassert(exp) \
|
|
|
|
do { \
|
|
|
|
if(!(exp)) { \
|
|
|
|
logCritical(0, \
|
|
|
|
"Soft assertion @{}:{} '{}' failed! This could cause fatal fails!", \
|
|
|
|
__FILE__, __LINE__, #exp); \
|
|
|
|
} \
|
2020-01-24 02:49:59 +01:00
|
|
|
} while(0)
|
2019-06-26 22:11:22 +02:00
|
|
|
#endif
|