Browse Source

Fixed some compiler warnings

tags/2021-05-28
Tom Poole 6 years ago
parent
commit
b59fa68724
5 changed files with 21 additions and 21 deletions
  1. +5
    -5
      modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp
  2. +4
    -4
      modules/juce_audio_processors/utilities/juce_RangedAudioParameter.cpp
  3. +2
    -2
      modules/juce_core/network/juce_NamedPipe.cpp
  4. +4
    -4
      modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp
  5. +6
    -6
      modules/juce_osc/osc/juce_OSCReceiver.cpp

+ 5
- 5
modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp 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),


+ 4
- 4
modules/juce_audio_processors/utilities/juce_RangedAudioParameter.cpp View File

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


+ 2
- 2
modules/juce_core/network/juce_NamedPipe.cpp 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);


+ 4
- 4
modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp 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)
: ResizableWindow (name, backgroundColour, parentComponent == nullptr),
Component* parentComp)
: 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)
parentComponent->addAndMakeVisible (this);
if (parentComp != nullptr)
parentComp->addAndMakeVisible (this);
} }
FileChooserDialogBox::~FileChooserDialogBox() FileChooserDialogBox::~FileChooserDialogBox()


+ 6
- 6
modules/juce_osc/osc/juce_OSCReceiver.cpp 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); });
} }
} }


Loading…
Cancel
Save