godotengine / godotengine/godot-cpp
CRASH_COND should interrupt execution
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
The `CRASH_COND` macro is defined like this:
```cpp
#define CRASH_COND(cond) \
do { \
if (unlikely(cond)) { \
FATAL_PRINT(ERR_MSG_COND(cond)); \
return; \
} \
} while (0)
```
But this does not behave like an assertion like in Godot, and resumes execution. It should instead stop execution without even expecting to put a return value, like so: https://github.com/godotengine/godot/blob/7b685a1558aaa7e014d358c2db8be83aef5d8b8f/core/error/error_macros.h#L450
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.