mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Improved error message reported by ASSERT_NOTNULL
This commit is contained in:
@@ -55,10 +55,13 @@ namespace Trinity
|
||||
#define ASSERT WPAssert
|
||||
#define ABORT WPAbort
|
||||
|
||||
template <typename T> inline T* ASSERT_NOTNULL(T* pointer)
|
||||
template <typename T>
|
||||
inline T* ASSERT_NOTNULL_IMPL(T* pointer, char const* expr)
|
||||
{
|
||||
ASSERT(pointer);
|
||||
ASSERT(pointer, "%s", expr);
|
||||
return pointer;
|
||||
}
|
||||
|
||||
#define ASSERT_NOTNULL(pointer) ASSERT_NOTNULL_IMPL(pointer, #pointer)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user