1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Remove do{ } while(0) wrapper around error macros

This commit is contained in:
Haoyu Qiu
2021-09-12 14:47:33 +08:00
parent 95162ca393
commit 70853fd669
15 changed files with 209 additions and 230 deletions

View File

@@ -75,16 +75,15 @@ subject to the following restrictions:
// -- GODOT end --
#ifdef DEBUG_ENABLED
#define CHULL_ASSERT(m_cond) \
do { \
if (unlikely(!(m_cond))) { \
ERR_PRINT("Assertion \"" _STR(m_cond) "\" failed.") \
} \
} while (0)
#define CHULL_ASSERT(m_cond) \
if (unlikely(!(m_cond))) { \
ERR_PRINT("Assertion \"" _STR(m_cond) "\" failed."); \
} else \
((void)0)
#else
#define CHULL_ASSERT(m_cond) \
do { \
} while (0)
} while (false)
#endif
#if defined(DEBUG_CONVEX_HULL) || defined(SHOW_ITERATIONS)