Skip to content

Commit

Permalink
Add assignment operators in parameter classes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrhaase committed Oct 29, 2024
1 parent 17edebc commit 67d8fac
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ class FloatParameter : public juce::AudioParameterFloat,

using Ptr = OptionalPointer<FloatParameter>;

FloatParameter& operator= (float newValue)
{
AudioParameterFloat::operator= (newValue);
return *this;
}

/** Returns the default value for the parameter. */
float getDefaultValue() const override { return unsnappedDefault; }

Expand Down Expand Up @@ -152,6 +158,12 @@ class BoolParameter : public juce::AudioParameterBool,

using Ptr = OptionalPointer<BoolParameter>;

BoolParameter& operator= (bool newValue)
{
AudioParameterBool::operator= (newValue);
return *this;
}

private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BoolParameter)
};
Expand Down

0 comments on commit 67d8fac

Please sign in to comment.