macOs build fix
This commit is contained in:
parent
ae8a5e44c8
commit
ba8b45f7f4
@ -378,10 +378,15 @@ private:
|
|||||||
double m_sr = 0.0;
|
double m_sr = 0.0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace XenUtils
|
||||||
|
{
|
||||||
|
|
||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
inline std::unique_ptr<T> makeAddAndMakeVisible(Component& parent, Args&&... args)
|
inline std::unique_ptr<T> makeAddAndMakeVisible(Component& parent, Args&&... args)
|
||||||
{
|
{
|
||||||
auto temp = std::make_unique<T>(args...);
|
auto temp = std::make_unique<T>(args...);
|
||||||
parent.addAndMakeVisible(temp.get());
|
parent.addAndMakeVisible(temp.get());
|
||||||
return std::move(temp);
|
return std::move(temp);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1182,7 +1182,7 @@ ParameterComponent::ParameterComponent(AudioProcessorParameter * par, bool notif
|
|||||||
AudioParameterFloat* floatpar = dynamic_cast<AudioParameterFloat*>(par);
|
AudioParameterFloat* floatpar = dynamic_cast<AudioParameterFloat*>(par);
|
||||||
if (floatpar)
|
if (floatpar)
|
||||||
{
|
{
|
||||||
m_slider = makeAddAndMakeVisible<MySlider>(*this,&floatpar->range);
|
m_slider = XenUtils::makeAddAndMakeVisible<MySlider>(*this,&floatpar->range);
|
||||||
m_notify_only_on_release = notifyOnlyOnRelease;
|
m_notify_only_on_release = notifyOnlyOnRelease;
|
||||||
m_slider->setRange(floatpar->range.start, floatpar->range.end, floatpar->range.interval);
|
m_slider->setRange(floatpar->range.start, floatpar->range.end, floatpar->range.interval);
|
||||||
m_slider->setValue(*floatpar, dontSendNotification);
|
m_slider->setValue(*floatpar, dontSendNotification);
|
||||||
@ -1192,7 +1192,7 @@ ParameterComponent::ParameterComponent(AudioProcessorParameter * par, bool notif
|
|||||||
AudioParameterInt* intpar = dynamic_cast<AudioParameterInt*>(par);
|
AudioParameterInt* intpar = dynamic_cast<AudioParameterInt*>(par);
|
||||||
if (intpar)
|
if (intpar)
|
||||||
{
|
{
|
||||||
m_slider = makeAddAndMakeVisible<MySlider>(*this);
|
m_slider = XenUtils::makeAddAndMakeVisible<MySlider>(*this);
|
||||||
m_notify_only_on_release = notifyOnlyOnRelease;
|
m_notify_only_on_release = notifyOnlyOnRelease;
|
||||||
m_slider->setRange(intpar->getRange().getStart(), intpar->getRange().getEnd(), 1.0);
|
m_slider->setRange(intpar->getRange().getStart(), intpar->getRange().getEnd(), 1.0);
|
||||||
m_slider->setValue(*intpar, dontSendNotification);
|
m_slider->setValue(*intpar, dontSendNotification);
|
||||||
|
Loading…
Reference in New Issue
Block a user