JUCE_LIVE_CONSTANT (small) bug


#1

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


#2

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.


#3

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


#4

Sure thing.

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