mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-22 01:34:21 +00:00
Fixed some MacOS compiler warnings in the JUCE demo host
This commit is contained in:
parent
60e9231fb1
commit
00673ec3bc
4 changed files with 16 additions and 20 deletions
|
|
@ -11,7 +11,7 @@
|
|||
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Plugin Host"
|
||||
osxSDK="default" osxCompatibility="default" osxArchitecture="default"/>
|
||||
<CONFIGURATION name="Release" isDebug="0" optimisation="2" targetName="Plugin Host"
|
||||
osxSDK="default" osxCompatibility="10.5 SDK" osxArchitecture="default"/>
|
||||
osxSDK="default" osxCompatibility="10.6 SDK" osxArchitecture="default"/>
|
||||
</CONFIGURATIONS>
|
||||
<MODULEPATHS>
|
||||
<MODULEPATH id="juce_video" path="../../modules"/>
|
||||
|
|
|
|||
|
|
@ -391,7 +391,8 @@ static XmlElement* createNodeXml (AudioProcessorGraph::Node* const node) noexcep
|
|||
XmlElement* layouts = new XmlElement ("LAYOUT");
|
||||
const AudioProcessor::BusesLayout layout = plugin->getBusesLayout();
|
||||
|
||||
for (bool isInput : { true, false })
|
||||
const bool isInputChoices[] = { true, false };
|
||||
for (bool isInput : isInputChoices)
|
||||
layouts->addChildElement (createBusLayoutXml (layout, isInput));
|
||||
|
||||
e->addChildElement (layouts);
|
||||
|
|
@ -420,7 +421,8 @@ void FilterGraph::createNodeFromXml (const XmlElement& xml)
|
|||
{
|
||||
AudioProcessor::BusesLayout layout = instance->getBusesLayout();
|
||||
|
||||
for (bool isInput : { true, false })
|
||||
const bool isInputChoices[] = { true, false };
|
||||
for (bool isInput : isInputChoices)
|
||||
readBusLayoutFromXml (layout, instance, *layoutEntity, isInput);
|
||||
|
||||
instance->setBusesLayout (layout);
|
||||
|
|
@ -453,7 +455,7 @@ void FilterGraph::createNodeFromXml (const XmlElement& xml)
|
|||
{
|
||||
jassert (node->getProcessor() != nullptr);
|
||||
|
||||
if (PluginWindow* const w = PluginWindow::getWindowFor (node, type, graph))
|
||||
if (PluginWindow* const w = PluginWindow::getWindowFor (node, type))
|
||||
w->toFront (true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,11 +35,9 @@ static Array <PluginWindow*> activePluginWindows;
|
|||
|
||||
PluginWindow::PluginWindow (Component* const pluginEditor,
|
||||
AudioProcessorGraph::Node* const o,
|
||||
WindowFormatType t,
|
||||
AudioProcessorGraph& audioGraph)
|
||||
WindowFormatType t)
|
||||
: DocumentWindow (pluginEditor->getName(), Colours::lightblue,
|
||||
DocumentWindow::minimiseButton | DocumentWindow::closeButton),
|
||||
graph (audioGraph),
|
||||
owner (o),
|
||||
type (t)
|
||||
{
|
||||
|
|
@ -82,10 +80,9 @@ class ProcessorProgramPropertyComp : public PropertyComponent,
|
|||
private AudioProcessorListener
|
||||
{
|
||||
public:
|
||||
ProcessorProgramPropertyComp (const String& name, AudioProcessor& p, int index_)
|
||||
ProcessorProgramPropertyComp (const String& name, AudioProcessor& p)
|
||||
: PropertyComponent (name),
|
||||
owner (p),
|
||||
index (index_)
|
||||
owner (p)
|
||||
{
|
||||
owner.addListener (this);
|
||||
}
|
||||
|
|
@ -101,7 +98,6 @@ public:
|
|||
|
||||
private:
|
||||
AudioProcessor& owner;
|
||||
const int index;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProcessorProgramPropertyComp)
|
||||
};
|
||||
|
|
@ -129,7 +125,7 @@ public:
|
|||
if (name.isEmpty())
|
||||
name = "Unnamed";
|
||||
|
||||
ProcessorProgramPropertyComp* const pc = new ProcessorProgramPropertyComp (name, *p, i);
|
||||
ProcessorProgramPropertyComp* const pc = new ProcessorProgramPropertyComp (name, *p);
|
||||
programs.add (pc);
|
||||
totalHeight += pc->getPreferredHeight();
|
||||
}
|
||||
|
|
@ -157,8 +153,7 @@ private:
|
|||
|
||||
//==============================================================================
|
||||
PluginWindow* PluginWindow::getWindowFor (AudioProcessorGraph::Node* const node,
|
||||
WindowFormatType type,
|
||||
AudioProcessorGraph& audioGraph)
|
||||
WindowFormatType type)
|
||||
{
|
||||
jassert (node != nullptr);
|
||||
|
||||
|
|
@ -193,7 +188,7 @@ PluginWindow* PluginWindow::getWindowFor (AudioProcessorGraph::Node* const node,
|
|||
if (AudioPluginInstance* const plugin = dynamic_cast<AudioPluginInstance*> (processor))
|
||||
ui->setName (plugin->getName());
|
||||
|
||||
return new PluginWindow (ui, node, type, audioGraph);
|
||||
return new PluginWindow (ui, node, type);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
@ -395,7 +390,7 @@ public:
|
|||
default: break;
|
||||
};
|
||||
|
||||
if (PluginWindow* const w = PluginWindow::getWindowFor (f, type, graph.getGraph()))
|
||||
if (PluginWindow* const w = PluginWindow::getWindowFor (f, type))
|
||||
w->toFront (true);
|
||||
}
|
||||
}
|
||||
|
|
@ -429,7 +424,7 @@ public:
|
|||
else if (e.getNumberOfClicks() == 2)
|
||||
{
|
||||
if (const AudioProcessorGraph::Node::Ptr f = graph.getNodeForId (filterID))
|
||||
if (PluginWindow* const w = PluginWindow::getWindowFor (f, PluginWindow::Normal, graph.getGraph()))
|
||||
if (PluginWindow* const w = PluginWindow::getWindowFor (f, PluginWindow::Normal))
|
||||
w->toFront (true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,10 +132,10 @@ public:
|
|||
NumTypes
|
||||
};
|
||||
|
||||
PluginWindow (Component* pluginEditor, AudioProcessorGraph::Node*, WindowFormatType, AudioProcessorGraph&);
|
||||
PluginWindow (Component* pluginEditor, AudioProcessorGraph::Node*, WindowFormatType);
|
||||
~PluginWindow();
|
||||
|
||||
static PluginWindow* getWindowFor (AudioProcessorGraph::Node*, WindowFormatType, AudioProcessorGraph&);
|
||||
static PluginWindow* getWindowFor (AudioProcessorGraph::Node*, WindowFormatType);
|
||||
|
||||
static void closeCurrentlyOpenWindowsFor (const uint32 nodeId);
|
||||
static void closeAllCurrentlyOpenWindows();
|
||||
|
|
@ -144,7 +144,6 @@ public:
|
|||
void closeButtonPressed() override;
|
||||
|
||||
private:
|
||||
AudioProcessorGraph& graph;
|
||||
AudioProcessorGraph::Node* owner;
|
||||
WindowFormatType type;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue