While looking at assertion code (the new one with a fallback), I notice
that when assertions are disabled, they are nevertheless all evaluated:

#define LASSERT(expr, escape) \
        if (expr) {} else { lyx::doAssert(#expr, __FILE__, __LINE__); escape; }
#endif

This means that the old style asserts like LASSERT(foo, /**/) will
_always_ generate and execute doe even when assertions are diabled.
Isn't this contrary to the very intent of asserts?

We have 593 assertions in the code, and only 38 of them use the new
style.

Andre, was there a reason for doing what you did (like avoid recompiling
everything when the setting is changed)?

I think a new macro should be introduced for the two-parameter version.

JMarc

Reply via email to