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

Add DEV_ASSERT and DEV_CHECK macros

Change the existing DEV_ASSERT function to be switched on and off by the DEV_ENABLED define. DEV_ASSERT breaks into the debugger as soon as hit.
Add error macros DEV_CHECK and DEV_CHECK_ONCE to add an alternative check that ERR_PRINT when a condition fails, again only enabled in DEV_ENABLED builds.
This commit is contained in:
lawnjelly
2021-10-04 14:13:43 +01:00
parent 555e937815
commit c835f1f3c5
9 changed files with 58 additions and 35 deletions

View File

@@ -500,7 +500,7 @@ void RasterizerCanvasGLES3::render_batches(Item *p_current_clip, bool &r_reclip,
default: {
int end_command = batch.first_command + batch.num_commands;
RAST_DEV_DEBUG_ASSERT(batch.item);
DEV_ASSERT(batch.item);
RasterizerCanvas::Item::Command *const *commands = batch.item->commands.ptr();
for (int i = batch.first_command; i < end_command; i++) {