summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bx/src/bx_p.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bx/src/bx_p.h')
-rw-r--r--3rdparty/bx/src/bx_p.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/3rdparty/bx/src/bx_p.h b/3rdparty/bx/src/bx_p.h
new file mode 100644
index 00000000000..df37a2c5791
--- /dev/null
+++ b/3rdparty/bx/src/bx_p.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2010-2017 Branimir Karadzic. All rights reserved.
+ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
+ */
+
+#ifndef BX_P_H_HEADER_GUARD
+#define BX_P_H_HEADER_GUARD
+
+#ifndef BX_CONFIG_DEBUG
+# define BX_CONFIG_DEBUG 0
+#endif // BX_CONFIG_DEBUG
+
+#if BX_CONFIG_DEBUG
+# define BX_TRACE _BX_TRACE
+# define BX_WARN _BX_WARN
+# define BX_CHECK _BX_CHECK
+# define BX_CONFIG_ALLOCATOR_DEBUG 1
+#endif // BX_CONFIG_DEBUG
+
+#define _BX_TRACE(_format, ...) \
+ BX_MACRO_BLOCK_BEGIN \
+ bx::debugPrintf(__FILE__ "(" BX_STRINGIZE(__LINE__) "): BX " _format "\n", ##__VA_ARGS__); \
+ BX_MACRO_BLOCK_END
+
+#define _BX_WARN(_condition, _format, ...) \
+ BX_MACRO_BLOCK_BEGIN \
+ if (!BX_IGNORE_C4127(_condition) ) \
+ { \
+ BX_TRACE("WARN " _format, ##__VA_ARGS__); \
+ } \
+ BX_MACRO_BLOCK_END
+
+#define _BX_CHECK(_condition, _format, ...) \
+ BX_MACRO_BLOCK_BEGIN \
+ if (!BX_IGNORE_C4127(_condition) ) \
+ { \
+ BX_TRACE("CHECK " _format, ##__VA_ARGS__); \
+ bx::debugBreak(); \
+ } \
+ BX_MACRO_BLOCK_END
+
+#include <bx/bx.h>
+
+#endif // BX_P_H_HEADER_GUARD