More fixes for Assert.
continuous-integration/drone/push Build is passing

This commit is contained in:
Deukhoofd committed 2020-03-22 12:02:02 +01:00
1 parent 2d4cc2cd80
commit aa1b90554f
2 files changed
+13 -8

No files matched your search

+6 -8
View File
@@ -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)