JUCE_LIVE_CONSTANT (small) bug

minor bug.
this triggers a jassertfalse

myVar = JUCE_LIVE_CONSTANT(30) / 100.f; // JUCE_LIVE_CONSTANT(452) / 1000.f

The compiler seems to think that the commented out JUCE_LIVE_CONSTANT is still valid code

Yep, and there are probably a hundred other ways you could confuse the trivially dumb parser that the live constant stuff uses!

No programmer is likely to actually be confused by this, it’s not worth us adding a full C++ parser just to avoid this kind of thing.

just alerting other n00bs like myself, that’s all.

Sure thing.

And remember kids: leaving commented-out code in your project is A Bad Thing!

5 Likes