1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed some compiler warnings

This commit is contained in:
Tom Poole 2019-05-01 11:55:33 +01:00
parent 12b0a90c55
commit b59fa68724
5 changed files with 21 additions and 21 deletions

View file

@ -32,24 +32,24 @@ AudioProcessorValueTreeState::Parameter::Parameter (const String& parameterID,
const String& parameterName, const String& parameterName,
const String& labelText, const String& labelText,
NormalisableRange<float> valueRange, NormalisableRange<float> valueRange,
float defaultValue, float defaultParameterValue,
std::function<String(float)> valueToTextFunction, std::function<String(float)> valueToTextFunction,
std::function<float(const String&)> textToValueFunction, std::function<float(const String&)> textToValueFunction,
bool isMetaParameter, bool isMetaParameter,
bool isAutomatableParameter, bool isAutomatableParameter,
bool isDiscrete, bool isDiscrete,
AudioProcessorParameter::Category category, AudioProcessorParameter::Category parameterCategory,
bool isBoolean) bool isBoolean)
: AudioParameterFloat (parameterID, : AudioParameterFloat (parameterID,
parameterName, parameterName,
valueRange, valueRange,
defaultValue, defaultParameterValue,
labelText, labelText,
category, parameterCategory,
valueToTextFunction == nullptr ? std::function<String(float v, int)>() valueToTextFunction == nullptr ? std::function<String(float v, int)>()
: [valueToTextFunction](float v, int) { return valueToTextFunction (v); }, : [valueToTextFunction](float v, int) { return valueToTextFunction (v); },
std::move (textToValueFunction)), std::move (textToValueFunction)),
unsnappedDefault (valueRange.convertTo0to1 (defaultValue)), unsnappedDefault (valueRange.convertTo0to1 (defaultParameterValue)),
metaParameter (isMetaParameter), metaParameter (isMetaParameter),
automatable (isAutomatableParameter), automatable (isAutomatableParameter),
discrete (isDiscrete), discrete (isDiscrete),

View file

@ -28,10 +28,10 @@ namespace juce
{ {
RangedAudioParameter::RangedAudioParameter (const String& parameterID, RangedAudioParameter::RangedAudioParameter (const String& parameterID,
const String& name, const String& parameterName,
const String& label, const String& parameterLabel,
Category category) Category parameterCategory)
: AudioProcessorParameterWithID (parameterID, name, label, category) : AudioProcessorParameterWithID (parameterID, parameterName, parameterLabel, parameterCategory)
{ {
} }

View file

@ -198,9 +198,9 @@ private:
//============================================================================== //==============================================================================
struct NamedPipeThread : public Thread struct NamedPipeThread : public Thread
{ {
NamedPipeThread (const String& threadName, const String& pName, NamedPipeThread (const String& tName, const String& pName,
bool shouldCreatePipe, WaitableEvent& completed) bool shouldCreatePipe, WaitableEvent& completed)
: Thread (threadName), pipeName (pName), workCompleted (completed) : Thread (tName), pipeName (pName), workCompleted (completed)
{ {
if (shouldCreatePipe) if (shouldCreatePipe)
pipe.createNewPipe (pipeName); pipe.createNewPipe (pipeName);

View file

@ -95,8 +95,8 @@ FileChooserDialogBox::FileChooserDialogBox (const String& name,
FileBrowserComponent& chooserComponent, FileBrowserComponent& chooserComponent,
bool shouldWarn, bool shouldWarn,
Colour backgroundColour, Colour backgroundColour,
Component* parentComponent) Component* parentComp)
: ResizableWindow (name, backgroundColour, parentComponent == nullptr), : ResizableWindow (name, backgroundColour, parentComp == nullptr),
warnAboutOverwritingExistingFiles (shouldWarn) warnAboutOverwritingExistingFiles (shouldWarn)
{ {
content = new ContentComponent (name, instructions, chooserComponent); content = new ContentComponent (name, instructions, chooserComponent);
@ -113,8 +113,8 @@ FileChooserDialogBox::FileChooserDialogBox (const String& name,
FileChooserDialogBox::selectionChanged(); FileChooserDialogBox::selectionChanged();
if (parentComponent != nullptr) if (parentComp != nullptr)
parentComponent->addAndMakeVisible (this); parentComp->addAndMakeVisible (this);
} }
FileChooserDialogBox::~FileChooserDialogBox() FileChooserDialogBox::~FileChooserDialogBox()

View file

@ -526,33 +526,33 @@ private:
//============================================================================== //==============================================================================
void callListeners (const OSCBundle::Element& content) void callListeners (const OSCBundle::Element& content)
{ {
using Listener = OSCReceiver::Listener<OSCReceiver::MessageLoopCallback>; using OSCListener = OSCReceiver::Listener<OSCReceiver::MessageLoopCallback>;
if (content.isMessage()) if (content.isMessage())
{ {
auto&& message = content.getMessage(); auto&& message = content.getMessage();
listeners.call ([&] (Listener& l) { l.oscMessageReceived (message); }); listeners.call ([&] (OSCListener& l) { l.oscMessageReceived (message); });
} }
else if (content.isBundle()) else if (content.isBundle())
{ {
auto&& bundle = content.getBundle(); auto&& bundle = content.getBundle();
listeners.call ([&] (Listener& l) { l.oscBundleReceived (bundle); }); listeners.call ([&] (OSCListener& l) { l.oscBundleReceived (bundle); });
} }
} }
void callRealtimeListeners (const OSCBundle::Element& content) void callRealtimeListeners (const OSCBundle::Element& content)
{ {
using Listener = OSCReceiver::Listener<OSCReceiver::RealtimeCallback>; using OSCListener = OSCReceiver::Listener<OSCReceiver::RealtimeCallback>;
if (content.isMessage()) if (content.isMessage())
{ {
auto&& message = content.getMessage(); auto&& message = content.getMessage();
realtimeListeners.call ([&] (Listener& l) { l.oscMessageReceived (message); }); realtimeListeners.call ([&] (OSCListener& l) { l.oscMessageReceived (message); });
} }
else if (content.isBundle()) else if (content.isBundle())
{ {
auto&& bundle = content.getBundle(); auto&& bundle = content.getBundle();
realtimeListeners.call ([&] (Listener& l) { l.oscBundleReceived (bundle); }); realtimeListeners.call ([&] (OSCListener& l) { l.oscBundleReceived (bundle); });
} }
} }