Further fixes for Assert
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
07f215a4fa
commit
2d4cc2cd80
|
@ -1,5 +1,3 @@
|
||||||
#ifndef ARBUTILS_ASSERT_HPP
|
|
||||||
#define ARBUTILS_ASSERT_HPP
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -15,12 +13,10 @@
|
||||||
ss << #expr << "\""; \
|
ss << #expr << "\""; \
|
||||||
throw std::logic_error(ss.str()); \
|
throw std::logic_error(ss.str()); \
|
||||||
} \
|
} \
|
||||||
}
|
};
|
||||||
#else
|
#else
|
||||||
// Assert is empty if NO_ASSERT is defined.
|
// Assert is empty if NO_ASSERT is defined.
|
||||||
#define Assert(expr)
|
#define Assert(expr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define AssertNotNull(value) Assert(value != nullptr)
|
#define AssertNotNull(value) Assert(value != nullptr)
|
||||||
|
|
||||||
#endif
|
|
Loading…
Reference in New Issue