diff --git a/modules/juce_audio_formats/format/juce_AudioFormat.h b/modules/juce_audio_formats/format/juce_AudioFormat.h index 196d4366c2..39bcbae14e 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormat.h +++ b/modules/juce_audio_formats/format/juce_AudioFormat.h @@ -119,7 +119,7 @@ public: should then be deleted by the caller. If the stream can't be created for some reason (e.g. the parameters passed in - here aren't suitable), this will return 0. + here aren't suitable), this will return nullptr. @param streamToWriteTo the stream that the data will go to - this will be deleted by the AudioFormatWriter object when it's no longer diff --git a/modules/juce_core/memory/juce_Singleton.h b/modules/juce_core/memory/juce_Singleton.h index 00ea0afe09..ce1406e978 100644 --- a/modules/juce_core/memory/juce_Singleton.h +++ b/modules/juce_core/memory/juce_Singleton.h @@ -44,7 +44,7 @@ destructor, in case it is deleted by other means than deleteInstance() Clients can then call the static method MyClass::getInstance() to get a pointer - to the singleton, or MyClass::getInstanceWithoutCreating() which will return 0 if + to the singleton, or MyClass::getInstanceWithoutCreating() which will return nullptr if no instance currently exists. e.g. @code diff --git a/modules/juce_core/threads/juce_Thread.h b/modules/juce_core/threads/juce_Thread.h index aef96b7dc0..74b6996801 100644 --- a/modules/juce_core/threads/juce_Thread.h +++ b/modules/juce_core/threads/juce_Thread.h @@ -235,7 +235,7 @@ public: /** Finds the thread object that is currently running. Note that the main UI thread (or other non-Juce threads) don't have a Thread - object associated with them, so this will return 0. + object associated with them, so this will return nullptr. */ static Thread* JUCE_CALLTYPE getCurrentThread(); diff --git a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h index 5be135a7d4..d040dc9a06 100644 --- a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h +++ b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h @@ -154,7 +154,7 @@ public: This will search the list of registered commands for one with the given command ID number, and return its associated info. If no matching command is found, this - will return 0. + will return nullptr. */ const ApplicationCommandInfo* getCommandForID (CommandID commandID) const noexcept; diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h index 8004fd6334..678c2e1b24 100644 --- a/modules/juce_gui_basics/components/juce_Component.h +++ b/modules/juce_gui_basics/components/juce_Component.h @@ -796,7 +796,7 @@ public: /** Searches the parent components for a component of a specified class. For example findParentComponentOfClass \() would return the first parent - component that can be dynamically cast to a MyComp, or will return 0 if none + component that can be dynamically cast to a MyComp, or will return nullptr if none of the parents are suitable. */ template diff --git a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h index b9eba92d46..f737d2107f 100644 --- a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h +++ b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h @@ -231,7 +231,6 @@ public: Rectangle getColumnPosition (int index) const; /** Finds the column ID at a given x-position in the component. - If there is a column at this point this returns its ID, or if not, it will return 0. */ int getColumnIdAtX (int xToFind) const; @@ -412,9 +411,9 @@ private: bool isVisible() const; }; - OwnedArray columns; - Array listeners; - ScopedPointer dragOverlayComp; + OwnedArray columns; + Array listeners; + ScopedPointer dragOverlayComp; class DragOverlayComp; bool columnsChanged, columnsResized, sortChanged, menuActive, stretchToFit; diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp index 9b2b7cbb9c..45f7e88670 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp @@ -158,7 +158,7 @@ public: { ToolbarItemComponent* const tc = bar.items.getUnchecked(i); - if (dynamic_cast (tc) == nullptr && ! tc->isVisible()) + if (dynamic_cast (tc) == nullptr && ! tc->isVisible()) { oldIndexes.insert (0, i); addAndMakeVisible (tc, 0); @@ -174,7 +174,7 @@ public: { for (int i = 0; i < getNumChildComponents(); ++i) { - if (ToolbarItemComponent* const tc = dynamic_cast (getChildComponent (i))) + if (ToolbarItemComponent* const tc = dynamic_cast (getChildComponent (i))) { tc->setVisible (false); const int index = oldIndexes.remove (i); @@ -196,7 +196,7 @@ public: for (int i = 0; i < getNumChildComponents(); ++i) { - if (ToolbarItemComponent* const tc = dynamic_cast (getChildComponent (i))) + if (ToolbarItemComponent* const tc = dynamic_cast (getChildComponent (i))) { int preferredSize = 1, minSize = 1, maxSize = 1; @@ -455,7 +455,7 @@ void Toolbar::updateAllItemPositions (const bool animate) tc->setStyle (toolbarStyle); - Spacer* const spacer = dynamic_cast (tc); + Spacer* const spacer = dynamic_cast (tc); int preferredSize = 1, minSize = 1, maxSize = 1; @@ -555,7 +555,7 @@ bool Toolbar::isInterestedInDragSource (const SourceDetails& dragSourceDetails) void Toolbar::itemDragMove (const SourceDetails& dragSourceDetails) { - if (ToolbarItemComponent* const tc = dynamic_cast (dragSourceDetails.sourceComponent.get())) + if (ToolbarItemComponent* const tc = dynamic_cast (dragSourceDetails.sourceComponent.get())) { if (! items.contains (tc)) { @@ -623,7 +623,7 @@ void Toolbar::itemDragMove (const SourceDetails& dragSourceDetails) void Toolbar::itemDragExit (const SourceDetails& dragSourceDetails) { - if (ToolbarItemComponent* const tc = dynamic_cast (dragSourceDetails.sourceComponent.get())) + if (ToolbarItemComponent* const tc = dynamic_cast (dragSourceDetails.sourceComponent.get())) { if (isParentOf (tc)) { @@ -636,7 +636,7 @@ void Toolbar::itemDragExit (const SourceDetails& dragSourceDetails) void Toolbar::itemDropped (const SourceDetails& dragSourceDetails) { - if (ToolbarItemComponent* const tc = dynamic_cast (dragSourceDetails.sourceComponent.get())) + if (ToolbarItemComponent* const tc = dynamic_cast (dragSourceDetails.sourceComponent.get())) tc->setState (Button::buttonNormal); } @@ -669,7 +669,7 @@ public: bool canModalEventBeSentToComponent (const Component* comp) override { return toolbar.isParentOf (comp) - || dynamic_cast (comp) != nullptr; + || dynamic_cast (comp) != nullptr; } void positionNearBar() diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.h b/modules/juce_gui_basics/widgets/juce_Toolbar.h index 1a85726e53..32d011488a 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.h +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.h @@ -136,7 +136,7 @@ public: /** Returns the ID of the item with the given index. If the index is less than zero or greater than the number of items, - this will return 0. + this will return nullptr. @see getNumItems */ @@ -145,7 +145,7 @@ public: /** Returns the component being used for the item with the given index. If the index is less than zero or greater than the number of items, - this will return 0. + this will return nullptr. @see getNumItems */ @@ -314,7 +314,7 @@ private: ToolbarItemStyle toolbarStyle; class MissingItemsComponent; friend class MissingItemsComponent; - OwnedArray items; + OwnedArray items; class Spacer; class CustomisationDialog; diff --git a/modules/juce_gui_basics/widgets/juce_TreeView.h b/modules/juce_gui_basics/widgets/juce_TreeView.h index 587cd8e325..a5a51e53ae 100644 --- a/modules/juce_gui_basics/widgets/juce_TreeView.h +++ b/modules/juce_gui_basics/widgets/juce_TreeView.h @@ -717,7 +717,7 @@ public: int getNumRowsInTree() const; /** Returns the item on a particular row of the tree. - If the index is out of range, this will return 0. + If the index is out of range, this will return nullptr. @see getNumRowsInTree, TreeViewItem::getRowNumberInTree() */ TreeViewItem* getItemOnRow (int index) const; diff --git a/modules/juce_gui_basics/windows/juce_AlertWindow.h b/modules/juce_gui_basics/windows/juce_AlertWindow.h index 2d3601354f..733da87394 100644 --- a/modules/juce_gui_basics/windows/juce_AlertWindow.h +++ b/modules/juce_gui_basics/windows/juce_AlertWindow.h @@ -198,25 +198,23 @@ public: void addCustomComponent (Component* component); /** Returns the number of custom components in the dialog box. - @see getCustomComponent, addCustomComponent */ int getNumCustomComponents() const; /** Returns one of the custom components in the dialog box. - @param index a value 0 to (getNumCustomComponents() - 1). Out-of-range indexes - will return 0 + @param index a value 0 to (getNumCustomComponents() - 1). + Out-of-range indexes will return nullptr @see getNumCustomComponents, addCustomComponent */ Component* getCustomComponent (int index) const; /** Removes one of the custom components in the dialog box. - Note that this won't delete it, it just removes the component from the window - @param index a value 0 to (getNumCustomComponents() - 1). Out-of-range indexes - will return 0 + @param index a value 0 to (getNumCustomComponents() - 1). + Out-of-range indexes will return nullptr @returns the component that was removed (or null) @see getNumCustomComponents, addCustomComponent */ diff --git a/modules/juce_gui_basics/windows/juce_TopLevelWindow.h b/modules/juce_gui_basics/windows/juce_TopLevelWindow.h index ce1b104273..0a56186716 100644 --- a/modules/juce_gui_basics/windows/juce_TopLevelWindow.h +++ b/modules/juce_gui_basics/windows/juce_TopLevelWindow.h @@ -82,7 +82,7 @@ public: them, you can use this to show it in front of the relevent parent window, which is a bit neater than just having it appear in the middle of the screen. - If componentToCentreAround is 0, then the currently active TopLevelWindow will + If componentToCentreAround is nullptr, then the currently active TopLevelWindow will be used instead. If no window is focused, it'll just default to the middle of the screen. */