r5sdk/r5dev/core/assert.h

18 lines
546 B
C
Raw Normal View History

#pragma once
//#ifndef NDEBUG
//# define Assert(condition, message) \
// do { \
// if (! (condition)) { \
// std::cerr << "Assertion '" #condition "' failed in " << __FILE__ \
// << " line " << __LINE__ << ": " << message << std::endl; \
// assert(condition); \
// } \
// } while (false)
//#else
# define Assert(condition, ...) assert(condition)
# define AssertFatalMsg Assert
2024-01-04 16:08:27 +01:00
// TODO: this needs to go to dbg.h
# define AssertMsg(condition, ...) assert(condition)
//#endif