reticulatedpines / magiclantern_simplified

A Git based version of Magic Lantern, for those unwilling or unable to work using Mercurial. The vast majority of branches have been removed, with those thought to be important brought in individually and merged.
GNU General Public License v2.0
142 stars 47 forks source link

ML ASSERT() doesn't assert, rename #130

Open reticulatedpines opened 5 months ago

reticulatedpines commented 5 months ago

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().