More fixes for Assert.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -6,14 +6,12 @@
|
||||
|
||||
#ifndef NO_ASSERT
|
||||
#define Assert(expr) \
|
||||
{ \
|
||||
if (!(expr)) { \
|
||||
std::stringstream ss; \
|
||||
ss << "ASSERTION FAILED: [" << __FILENAME__ << " (" << __LINE__ << ")] \""; \
|
||||
ss << #expr << "\""; \
|
||||
throw std::logic_error(ss.str()); \
|
||||
} \
|
||||
};
|
||||
if (!(expr)) { \
|
||||
std::stringstream ss; \
|
||||
ss << "ASSERTION FAILED: [" << __FILENAME__ << " (" << __LINE__ << ")] \""; \
|
||||
ss << #expr << "\""; \
|
||||
throw std::logic_error(ss.str()); \
|
||||
}
|
||||
#else
|
||||
// Assert is empty if NO_ASSERT is defined.
|
||||
#define Assert(expr)
|
||||
|
||||
Reference in New Issue
Block a user