Ponca
aa50bfdf187919869239c5b44b748842569114c1
Point Cloud Analysis library
Loading...
Searching...
No Matches
Assert.h
1
#pragma once
2
3
#include "./Macro.h"
4
5
#define PONCA_ERROR \
6
PONCA_MACRO_START \
7
PONCA_PRINT_ERROR(""
); \
8
PONCA_CRASH; \
9
PONCA_MACRO_END
10
11
#define PONCA_ERROR_MSG(MSG) \
12
PONCA_MACRO_START \
13
PONCA_PRINT_ERROR(MSG); \
14
PONCA_CRASH; \
15
PONCA_MACRO_END
16
17
#define PONCA_ASSERT(EXPR) \
18
PONCA_MACRO_START \
19
if(!(EXPR)) { \
20
PONCA_ERROR_MSG(PONCA_STR(EXPR)); \
21
} \
22
PONCA_MACRO_END
23
24
#define PONCA_ASSERT_MSG(EXPR,MSG) \
25
PONCA_MACRO_START \
26
if(!(EXPR)) { \
27
PONCA_ERROR_MSG(MSG); \
28
} \
29
PONCA_MACRO_END
30
31
#ifdef PONCA_DEBUG
32
#define PONCA_DEBUG_ASSERT(EXPR) PONCA_ASSERT(EXPR)
33
#define PONCA_DEBUG_ASSERT_MSG(EXPR,MSG) PONCA_ASSERT_MSG(EXPR,MSG)
34
#define PONCA_DEBUG_ERROR_MSG(MSG) PONCA_ERROR_MSG(MSG)
35
#define PONCA_DEBUG_ERROR PONCA_ERROR
36
#else
37
#define PONCA_DEBUG_ASSERT(EXPR)
38
#define PONCA_DEBUG_ASSERT_MSG(EXPR,MSG)
39
#define PONCA_DEBUG_ERROR_MSG(MSG)
40
#define PONCA_DEBUG_ERROR
41
#endif
src
Ponca
src
Common
Assert.h
Generated on Tue Oct 29 2024 09:49:07 for Ponca by
1.9.6