From 7fa708df289a7fc34704eef7e53248d0e8a75157 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 6 Feb 2018 16:56:02 +0000 Subject: [PATCH] Added a get() method to LiveValue and call it in the JUCE_LIVE_CONSTANT macro --- modules/juce_gui_extra/misc/juce_LiveConstantEditor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h index 712ca84542..5bfcce166e 100644 --- a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h +++ b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h @@ -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)