1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +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

@@ -554,7 +554,7 @@ void RasterizerCanvasBaseGLES3::_draw_gui_primitive(int p_points, const Vector2
stride += 1;
}
RAST_DEV_DEBUG_ASSERT(p_points <= 4);
DEV_ASSERT(p_points <= 4);
float b[(2 + 2 + 4 + 1) * 4];
for (int i = 0; i < p_points; i++) {