From 2b29f4918a4034a8c07cb5cc78bbe5144dedc113 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 5 Sep 2007 12:24:26 +0000 Subject: [PATCH] --- extras/audio plugins/demo/src/DemoEditorComponent.h | 2 +- .../audio/processors/juce_AudioProcessorEditor.cpp | 8 ++++---- .../audio/processors/juce_AudioProcessorEditor.h | 8 +++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/extras/audio plugins/demo/src/DemoEditorComponent.h b/extras/audio plugins/demo/src/DemoEditorComponent.h index 3ff5d7484d..a0530fc21b 100644 --- a/extras/audio plugins/demo/src/DemoEditorComponent.h +++ b/extras/audio plugins/demo/src/DemoEditorComponent.h @@ -92,7 +92,7 @@ private: // handy wrapper method to avoid having to cast the filter to a DemoJuceFilter // every time we need it.. - DemoJuceFilter* getFilter() const throw() { return (DemoJuceFilter*) getOwnerFilter(); } + DemoJuceFilter* getFilter() const throw() { return (DemoJuceFilter*) getAudioProcessor(); } }; diff --git a/src/juce_appframework/audio/processors/juce_AudioProcessorEditor.cpp b/src/juce_appframework/audio/processors/juce_AudioProcessorEditor.cpp index 70fb844f62..803f6de5d8 100644 --- a/src/juce_appframework/audio/processors/juce_AudioProcessorEditor.cpp +++ b/src/juce_appframework/audio/processors/juce_AudioProcessorEditor.cpp @@ -38,18 +38,18 @@ BEGIN_JUCE_NAMESPACE //============================================================================== -AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* const ownerFilter_) - : ownerFilter (ownerFilter_) +AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* const owner_) + : owner (owner_) { // the filter must be valid.. - jassert (ownerFilter != 0); + jassert (owner != 0); } AudioProcessorEditor::~AudioProcessorEditor() { // if this fails, then the wrapper hasn't called editorBeingDeleted() on the // filter for some reason.. - jassert (ownerFilter->getActiveEditor() != this); + jassert (owner->getActiveEditor() != this); } diff --git a/src/juce_appframework/audio/processors/juce_AudioProcessorEditor.h b/src/juce_appframework/audio/processors/juce_AudioProcessorEditor.h index 327c4378ec..dcd6cbe3ea 100644 --- a/src/juce_appframework/audio/processors/juce_AudioProcessorEditor.h +++ b/src/juce_appframework/audio/processors/juce_AudioProcessorEditor.h @@ -50,8 +50,6 @@ class AudioProcessorEditor : public Component protected: //============================================================================== /** Creates an editor for the specified processor. - - You'll need to pass in the filter that's creating it. */ AudioProcessorEditor (AudioProcessor* const owner); @@ -61,13 +59,13 @@ public: //============================================================================== - /** Returns a pointer to the filter that owns this editor. */ - AudioProcessor* getOwnerFilter() const throw() { return ownerFilter; } + /** Returns a pointer to the processor that this editor represents. */ + AudioProcessor* getAudioProcessor() const throw() { return owner; } private: //============================================================================== - AudioProcessor* const ownerFilter; + AudioProcessor* const owner; };