Browse Source

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

tags/2021-05-28
ed 7 years ago
parent
commit
7fa708df28
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      modules/juce_gui_extra/misc/juce_LiveConstantEditor.h

+ 2
- 1
modules/juce_gui_extra/misc/juce_LiveConstantEditor.h 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)


Loading…
Cancel
Save