1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

Added a get() method to LiveValue and call it in the JUCE_LIVE_CONSTANT macro

This commit is contained in:
ed 2018-02-06 16:56:02 +00:00
parent be6c1ba489
commit 7fa708df28

View file

@ -171,6 +171,7 @@ namespace LiveConstantEditor
{}
operator Type() const noexcept { return value; }
Type get() const noexcept { return value; }
operator const char*() const { return castToCharPointer (value); }
LivePropertyEditorBase* createPropertyComponent (CodeDocument& doc) override
@ -302,7 +303,7 @@ namespace LiveConstantEditor
@endcode
*/
#define JUCE_LIVE_CONSTANT(initialValue) \
(juce::LiveConstantEditor::getValue (__FILE__, __LINE__ - 1, initialValue))
(juce::LiveConstantEditor::getValue (__FILE__, __LINE__ - 1, initialValue).get())
#else
#define JUCE_LIVE_CONSTANT(initialValue) \
(initialValue)