magiclantern_simplified
magiclantern_simplified copied to clipboard
ML ASSERT() doesn't assert, rename
We have ASSERT(), but it isn't an assert, it's just a check-and-warn. And it's always included, there's no debug / release split.
This is confusing for devs, especially new devs, who may expect that ASSERTS a) only exist in debug builds b) when included, prevent later code from executing if the assert fails.
WARN() may be a more appropriate name. Note there is also a DryOS assert(), which is a function pointer so might not assert, but in practice always does. We also, optionally, replace this function pointer with our own (that does more verbose logging then transfers to DryOS original debug_assert().