Polyphase Game Engine
Loading...
Searching...
No Matches
Assertion.h
Go to the documentation of this file.
1#pragma once
2
3#include "PolyphaseAPI.h"
4#include <stdint.h>
5
6#define USE_CUSTOM_ASSERT 1
7
8#ifdef NDEBUG
9#define OCT_ASSERT(expr)
10#elif USE_CUSTOM_ASSERT
11POLYPHASE_API void SYS_Assert(const char* exprString, const char* fileString, uint32_t lineNumber);
12#define OCT_ASSERT(expr) (void)( \
13 (!!(expr)) || \
14 (SYS_Assert(#expr, __FILE__, __LINE__), 0) \
15 )
16#else
17#include <assert.h>
18#define OCT_ASSERT(expr) assert(expr)
19#endif
POLYPHASE_API void SYS_Assert(const char *exprString, const char *fileString, uint32_t lineNumber)
Export macros for Polyphase Engine symbols.
#define POLYPHASE_API
Definition PolyphaseAPI.h:31