From f3d9c3ebe0cad3225a3637ce4b22a42fb256a122 Mon Sep 17 00:00:00 2001 From: jules Date: Sun, 3 Feb 2013 10:55:45 +0000 Subject: [PATCH] Minor clean-ups. --- .../audio plugin host/Source/FilterGraph.cpp | 30 ++----------------- extras/audio plugin host/Source/FilterGraph.h | 27 ----------------- .../format/juce_AudioPluginFormat.h | 3 +- .../juce_core/native/juce_posix_NamedPipe.cpp | 3 +- 4 files changed, 6 insertions(+), 57 deletions(-) diff --git a/extras/audio plugin host/Source/FilterGraph.cpp b/extras/audio plugin host/Source/FilterGraph.cpp index fdfcfc4f9d..c5011b9888 100644 --- a/extras/audio plugin host/Source/FilterGraph.cpp +++ b/extras/audio plugin host/Source/FilterGraph.cpp @@ -30,25 +30,6 @@ #include "GraphEditorPanel.h" -//============================================================================== -FilterConnection::FilterConnection (FilterGraph& owner_) - : owner (owner_) -{ -} - -FilterConnection::FilterConnection (const FilterConnection& other) - : sourceFilterID (other.sourceFilterID), - sourceChannel (other.sourceChannel), - destFilterID (other.destFilterID), - destChannel (other.destChannel), - owner (other.owner) -{ -} - -FilterConnection::~FilterConnection() -{ -} - //============================================================================== const int FilterGraph::midiChannelNumber = 0x1000; @@ -339,9 +320,7 @@ void FilterGraph::createNodeFromXml (const XmlElement& xml) AudioProcessorGraph::Node::Ptr node (graph.addNode (instance, xml.getIntAttribute ("uid"))); - const XmlElement* const state = xml.getChildByName ("STATE"); - - if (state != nullptr) + if (const XmlElement* const state = xml.getChildByName ("STATE")) { MemoryBlock m; m.fromBase64Encoding (state->getAllSubText()); @@ -359,13 +338,10 @@ XmlElement* FilterGraph::createXml() const { XmlElement* xml = new XmlElement ("FILTERGRAPH"); - int i; - for (i = 0; i < graph.getNumNodes(); ++i) - { + for (int i = 0; i < graph.getNumNodes(); ++i) xml->addChildElement (createNodeXml (graph.getNode (i))); - } - for (i = 0; i < graph.getNumConnections(); ++i) + for (int i = 0; i < graph.getNumConnections(); ++i) { const AudioProcessorGraph::Connection* const fc = graph.getConnection(i); diff --git a/extras/audio plugin host/Source/FilterGraph.h b/extras/audio plugin host/Source/FilterGraph.h index 8721036a04..2c551195cd 100644 --- a/extras/audio plugin host/Source/FilterGraph.h +++ b/extras/audio plugin host/Source/FilterGraph.h @@ -32,33 +32,6 @@ class FilterGraph; const char* const filenameSuffix = ".filtergraph"; const char* const filenameWildcard = "*.filtergraph"; -//============================================================================== -/** - Represents a connection between two pins in a FilterGraph. -*/ -class FilterConnection -{ -public: - //============================================================================== - FilterConnection (FilterGraph& owner); - FilterConnection (const FilterConnection& other); - ~FilterConnection(); - - //============================================================================== - uint32 sourceFilterID; - int sourceChannel; - uint32 destFilterID; - int destChannel; - - //============================================================================== - juce_UseDebuggingNewOperator - -private: - FilterGraph& owner; - - FilterConnection& operator= (const FilterConnection&); -}; - //============================================================================== /** A collection of filters and some connections between them. diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormat.h b/modules/juce_audio_processors/format/juce_AudioPluginFormat.h index 66e87739a4..befb802ca1 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormat.h +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormat.h @@ -34,8 +34,7 @@ class PluginDescription; /** The base class for a type of plugin format, such as VST, AudioUnit, LADSPA, etc. - Use the static getNumFormats() and getFormat() calls to find the types - of format that are available. + @see AudioFormatManager */ class JUCE_API AudioPluginFormat { diff --git a/modules/juce_core/native/juce_posix_NamedPipe.cpp b/modules/juce_core/native/juce_posix_NamedPipe.cpp index efcad1c278..5059122e9b 100644 --- a/modules/juce_core/native/juce_posix_NamedPipe.cpp +++ b/modules/juce_core/native/juce_posix_NamedPipe.cpp @@ -177,7 +177,8 @@ void NamedPipe::close() pimpl->stopReadOperation = true; char buffer[1] = { 0 }; - ::write (pimpl->pipeIn, buffer, 1); + ssize_t done = ::write (pimpl->pipeIn, buffer, 1); + (void) done; ScopedWriteLock sl (lock); pimpl = nullptr;