diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h index 4eb41e2e2c..67a56f63ec 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h @@ -50,8 +50,7 @@ class JUCE_API AudioProcessorGraph : public AudioProcessor, { public: //============================================================================== - /** Creates an empty graph. - */ + /** Creates an empty graph. */ AudioProcessorGraph(); /** Destructor. @@ -152,7 +151,6 @@ public: //============================================================================== /** Deletes all nodes and connections from this graph. - Any processor objects in the graph will be deleted. */ void clear(); @@ -199,7 +197,6 @@ public: const Connection* getConnection (int index) const { return connections [index]; } /** Searches for a connection between some specified channels. - If no such connection is found, this returns nullptr. */ const Connection* getConnectionBetween (uint32 sourceNodeId, @@ -213,8 +210,7 @@ public: bool isConnected (uint32 possibleSourceNodeId, uint32 possibleDestNodeId) const; - /** Returns true if it would be legal to connect the specified points. - */ + /** Returns true if it would be legal to connect the specified points. */ bool canConnect (uint32 sourceNodeId, int sourceChannelIndex, uint32 destNodeId, int destChannelIndex) const; @@ -226,21 +222,16 @@ public: bool addConnection (uint32 sourceNodeId, int sourceChannelIndex, uint32 destNodeId, int destChannelIndex); - /** Deletes the connection with the specified index. - - Returns true if a connection was actually deleted. - */ + /** Deletes the connection with the specified index. */ void removeConnection (int index); /** Deletes any connection between two specified points. - Returns true if a connection was actually deleted. */ bool removeConnection (uint32 sourceNodeId, int sourceChannelIndex, uint32 destNodeId, int destChannelIndex); - /** Removes all connections from the specified node. - */ + /** Removes all connections from the specified node. */ bool disconnectNode (uint32 nodeId); /** Returns true if the given connection's channel numbers map on to valid @@ -392,7 +383,7 @@ public: const String getProgramName (int) { return String::empty; } void changeProgramName (int, const String&) { } - void getStateInformation (juce::MemoryBlock& destData); + void getStateInformation (juce::MemoryBlock&); void setStateInformation (const void* data, int sizeInBytes); private: diff --git a/modules/juce_core/containers/juce_OwnedArray.h b/modules/juce_core/containers/juce_OwnedArray.h index adf7fac1ee..6423215c99 100644 --- a/modules/juce_core/containers/juce_OwnedArray.h +++ b/modules/juce_core/containers/juce_OwnedArray.h @@ -133,7 +133,7 @@ public: /** Returns a pointer to the object at this index in the array, without checking whether the index is in-range. This is a faster and less safe version of operator[] which doesn't check the index passed in, so - it can be used when you're sure the index if always going to be legal. + it can be used when you're sure the index is always going to be legal. */ inline ObjectClass* getUnchecked (const int index) const noexcept { diff --git a/modules/juce_core/containers/juce_ReferenceCountedArray.h b/modules/juce_core/containers/juce_ReferenceCountedArray.h index 810cdb1f0f..c05a1f7eb8 100644 --- a/modules/juce_core/containers/juce_ReferenceCountedArray.h +++ b/modules/juce_core/containers/juce_ReferenceCountedArray.h @@ -156,7 +156,7 @@ public: whether the index is in-range. This is a faster and less safe version of operator[] which doesn't check the index passed in, so - it can be used when you're sure the index if always going to be legal. + it can be used when you're sure the index is always going to be legal. */ inline ObjectClassPtr getUnchecked (const int index) const noexcept { diff --git a/modules/juce_core/memory/juce_ScopedPointer.h b/modules/juce_core/memory/juce_ScopedPointer.h index 90332ad002..cde54396f3 100644 --- a/modules/juce_core/memory/juce_ScopedPointer.h +++ b/modules/juce_core/memory/juce_ScopedPointer.h @@ -127,7 +127,7 @@ public: If this ScopedPointer already points to an object, that object will first be deleted. - The pointer that you pass is may be null. + The pointer that you pass in may be a nullptr. */ ScopedPointer& operator= (ObjectType* const newObjectToTakePossessionOf) { diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index bf663f88d9..aa1ac2e036 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -2018,17 +2018,10 @@ void Component::setComponentEffect (ImageEffectFilter* const newEffect) //============================================================================== LookAndFeel& Component::getLookAndFeel() const noexcept { - const Component* c = this; - - do - { + for (const Component* c = this; c != nullptr; c = c->parentComponent) if (c->lookAndFeel != nullptr) return *(c->lookAndFeel); - c = c->parentComponent; - } - while (c != nullptr); - return LookAndFeel::getDefaultLookAndFeel(); } diff --git a/modules/juce_gui_basics/windows/juce_CallOutBox.cpp b/modules/juce_gui_basics/windows/juce_CallOutBox.cpp index 9c21d1eaad..6a7ecc81cf 100644 --- a/modules/juce_gui_basics/windows/juce_CallOutBox.cpp +++ b/modules/juce_gui_basics/windows/juce_CallOutBox.cpp @@ -192,7 +192,7 @@ void CallOutBox::updatePosition (const Rectangle& newAreaToPointTo, const R float distanceFromCentre = centre.getDistanceFrom (targets[i]); if (! (centrePointArea.contains (lines[i].getStart()) || centrePointArea.contains (lines[i].getEnd()))) - distanceFromCentre *= 50.0f; + distanceFromCentre += 1000.0f; if (distanceFromCentre < nearest) {