From 26b6f01ce3a7ee975a7dedcb3634196a1df9fa51 Mon Sep 17 00:00:00 2001 From: hogliux Date: Wed, 3 Aug 2016 09:43:07 +0100 Subject: [PATCH] Replace all "zeros" with "nullptr" in code documentation when referring to a pointer value --- .../sources/juce_AudioTransportSource.h | 2 +- modules/juce_core/containers/juce_PropertySet.h | 4 ++-- .../juce_core/memory/juce_SharedResourcePointer.h | 2 +- modules/juce_core/network/juce_URL.h | 2 +- modules/juce_core/threads/juce_ThreadPool.h | 4 ++-- modules/juce_core/xml/juce_XmlElement.h | 4 ++-- modules/juce_core/zip/juce_ZipFile.h | 6 +++--- .../undomanager/juce_UndoableAction.h | 2 +- .../layout/juce_ResizableBorderComponent.h | 6 +++--- .../layout/juce_ResizableEdgeComponent.h | 6 +++--- modules/juce_gui_basics/menus/juce_PopupMenu.h | 12 ++++++------ modules/juce_gui_basics/windows/juce_CallOutBox.h | 8 ++++---- modules/juce_gui_basics/windows/juce_DialogWindow.h | 4 ++-- .../juce_gui_basics/windows/juce_DocumentWindow.h | 6 +++--- .../misc/juce_RecentlyOpenedFilesList.h | 8 ++++---- 15 files changed, 38 insertions(+), 38 deletions(-) diff --git a/modules/juce_audio_devices/sources/juce_AudioTransportSource.h b/modules/juce_audio_devices/sources/juce_AudioTransportSource.h index d964d9200e..459881a308 100644 --- a/modules/juce_audio_devices/sources/juce_AudioTransportSource.h +++ b/modules/juce_audio_devices/sources/juce_AudioTransportSource.h @@ -60,7 +60,7 @@ public: The source passed in will not be deleted by this object, so must be managed by the caller. - @param newSource the new input source to use. This may be zero + @param newSource the new input source to use. This may be a nullptr @param readAheadBufferSize a size of buffer to use for reading ahead. If this is zero, no reading ahead will be done; if it's greater than zero, a BufferingAudioSource will be used diff --git a/modules/juce_core/containers/juce_PropertySet.h b/modules/juce_core/containers/juce_PropertySet.h index 88284e6d6a..310810f7e6 100644 --- a/modules/juce_core/containers/juce_PropertySet.h +++ b/modules/juce_core/containers/juce_PropertySet.h @@ -131,8 +131,8 @@ public: /** Sets a named property to an XML element. @param keyName the name of the property to set. (This mustn't be an empty string) - @param xml the new element to set it to. If this is zero, the value will be set to - an empty string + @param xml the new element to set it to. If this is a nullptr, the value will + be set to an empty string @see getXmlValue */ void setValue (const String& keyName, const XmlElement* xml); diff --git a/modules/juce_core/memory/juce_SharedResourcePointer.h b/modules/juce_core/memory/juce_SharedResourcePointer.h index 307b55951b..12a63ba4bf 100644 --- a/modules/juce_core/memory/juce_SharedResourcePointer.h +++ b/modules/juce_core/memory/juce_SharedResourcePointer.h @@ -122,7 +122,7 @@ public: SharedObjectType& get() const noexcept { return *sharedObject; } /** Returns the object that this pointer references. - The pointer returned may be zero, of course. + The pointer returned may be a nullptr, of course. */ SharedObjectType& getObject() const noexcept { return *sharedObject; } diff --git a/modules/juce_core/network/juce_URL.h b/modules/juce_core/network/juce_URL.h index aa7c154aa1..c68afe16ee 100644 --- a/modules/juce_core/network/juce_URL.h +++ b/modules/juce_core/network/juce_URL.h @@ -283,7 +283,7 @@ public: if the parameter httpRequestCmd is not specified (or empty) then this parameter will determine which HTTP request command will be used (POST or GET). - @param progressCallback if this is non-zero, it lets you supply a callback function + @param progressCallback if this is not a nullptr, it lets you supply a callback function to keep track of the operation's progress. This can be useful for lengthy POST operations, so that you can provide user feedback. @param progressCallbackContext if a callback is specified, this value will be passed to diff --git a/modules/juce_core/threads/juce_ThreadPool.h b/modules/juce_core/threads/juce_ThreadPool.h index 3934215e57..8d67a01076 100644 --- a/modules/juce_core/threads/juce_ThreadPool.h +++ b/modules/juce_core/threads/juce_ThreadPool.h @@ -237,8 +237,8 @@ public: methods called to try to interrupt them @param timeOutMilliseconds the length of time this method should wait for all the jobs to finish before giving up and returning false - @param selectedJobsToRemove if this is non-zero, the JobSelector object is asked to decide which - jobs should be removed. If it is zero, all jobs are removed + @param selectedJobsToRemove if this is not a nullptr, the JobSelector object is asked to decide + which jobs should be removed. If it is a nullptr, all jobs are removed @returns true if all jobs are successfully stopped and removed; false if the timeout period expires while waiting for one or more jobs to stop */ diff --git a/modules/juce_core/xml/juce_XmlElement.h b/modules/juce_core/xml/juce_XmlElement.h index 2d23c6b75d..e114aa7000 100644 --- a/modules/juce_core/xml/juce_XmlElement.h +++ b/modules/juce_core/xml/juce_XmlElement.h @@ -457,8 +457,8 @@ public: Also, it's much easier and neater to use this method indirectly via the forEachXmlChildElement macro. - @returns the sibling element that follows this one, or zero if this is the last - element in its parent + @returns the sibling element that follows this one, or a nullptr if + this is the last element in its parent @see getNextElement, isTextElement, forEachXmlChildElement */ diff --git a/modules/juce_core/zip/juce_ZipFile.h b/modules/juce_core/zip/juce_ZipFile.h index b253eeb768..84f7336dfd 100644 --- a/modules/juce_core/zip/juce_ZipFile.h +++ b/modules/juce_core/zip/juce_ZipFile.h @@ -91,7 +91,7 @@ public: int getNumEntries() const noexcept; /** Returns a structure that describes one of the entries in the zip file. - This may return zero if the index is out of range. + This may return a nullptr if the index is out of range. @see ZipFile::ZipEntry */ const ZipEntry* getEntry (int index) const noexcept; @@ -120,7 +120,7 @@ public: /** Creates a stream that can read from one of the zip file's entries. The stream that is returned must be deleted by the caller (and - zero might be returned if a stream can't be opened for some reason). + a nullptr might be returned if a stream can't be opened for some reason). The stream must not be used after the ZipFile object that created has been deleted. @@ -135,7 +135,7 @@ public: /** Creates a stream that can read from one of the zip file's entries. The stream that is returned must be deleted by the caller (and - zero might be returned if a stream can't be opened for some reason). + a nullptr might be returned if a stream can't be opened for some reason). The stream must not be used after the ZipFile object that created has been deleted. diff --git a/modules/juce_data_structures/undomanager/juce_UndoableAction.h b/modules/juce_data_structures/undomanager/juce_UndoableAction.h index 479dd7692f..c2bdd81e9d 100644 --- a/modules/juce_data_structures/undomanager/juce_UndoableAction.h +++ b/modules/juce_data_structures/undomanager/juce_UndoableAction.h @@ -90,7 +90,7 @@ public: If possible, this method should create and return a single action that does the same job as this one followed by the supplied action. - If it's not possible to merge the two actions, the method should return zero. + If it's not possible to merge the two actions, the method should return a nullptr. */ virtual UndoableAction* createCoalescedAction (UndoableAction* nextAction) { ignoreUnused (nextAction); return nullptr; } }; diff --git a/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h b/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h index bd7b57840f..ffafc987a2 100644 --- a/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h +++ b/modules/juce_gui_basics/layout/juce_ResizableBorderComponent.h @@ -57,9 +57,9 @@ public: Remember that when the target component is resized, it'll need to move and resize this component to keep it in place, as this won't happen automatically. - If the constrainer parameter is non-zero, then this object will be used to enforce - limits on the size and position that the component can be stretched to. Make sure - that the constrainer isn't deleted while still in use by this object. + If the constrainer parameter is not a nullptr, then this object will be used to + enforce limits on the size and position that the component can be stretched to. + Make sure that the constrainer isn't deleted while still in use by this object. @see ComponentBoundsConstrainer */ diff --git a/modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h b/modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h index 23c3689ec7..9ebab6688b 100644 --- a/modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h +++ b/modules/juce_gui_basics/layout/juce_ResizableEdgeComponent.h @@ -60,9 +60,9 @@ public: Remember that when the target component is resized, it'll need to move and resize this component to keep it in place, as this won't happen automatically. - If the constrainer parameter is non-zero, then this object will be used to enforce - limits on the size and position that the component can be stretched to. Make sure - that the constrainer isn't deleted while still in use by this object. + If the constrainer parameter is not a nullptr, then this object will be used to + enforce limits on the size and position that the component can be stretched to. + Make sure that the constrainer isn't deleted while still in use by this object. @see ComponentBoundsConstrainer */ diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.h b/modules/juce_gui_basics/menus/juce_PopupMenu.h index 6309250a2d..04a1ec0292 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.h +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.h @@ -439,12 +439,12 @@ public: in zero. @param standardItemHeight if this is non-zero, it will be used as the standard height for menu items (apart from custom items) - @param callback if this is non-zero, the menu will be launched asynchronously, - returning immediately, and the callback will receive a - call when the menu is either dismissed or has an item - selected. This object will be owned and deleted by the - system, so make sure that it works safely and that any - pointers that it uses are safely within scope. + @param callback if this is not a nullptr, the menu will be launched + asynchronously, returning immediately, and the callback + will receive a call when the menu is either dismissed or + has an item selected. This object will be owned and + deleted by the system, so make sure that it works safely + and that any pointers that it uses are safely within scope. @see showAt */ int show (int itemIDThatMustBeVisible = 0, diff --git a/modules/juce_gui_basics/windows/juce_CallOutBox.h b/modules/juce_gui_basics/windows/juce_CallOutBox.h index 6ff5990b0d..82c3cb4206 100644 --- a/modules/juce_gui_basics/windows/juce_CallOutBox.h +++ b/modules/juce_gui_basics/windows/juce_CallOutBox.h @@ -67,8 +67,8 @@ public: @param areaToPointTo the area that the call-out's arrow should point towards. If a parentComponent is supplied, then this is relative to that parent; otherwise, it's a global screen coord. - @param parentComponent if non-zero, this is the component to add the call-out to. If - this is a nullptr, the call-out will be added to the desktop. + @param parentComponent if not a nullptr, this is the component to add the call-out to. + If this is a nullptr, the call-out will be added to the desktop. */ CallOutBox (Component& contentComponent, const Rectangle& areaToPointTo, @@ -111,8 +111,8 @@ public: @param areaToPointTo the area that the call-out's arrow should point towards. If a parentComponent is supplied, then this is relative to that parent; otherwise, it's a global screen coord. - @param parentComponent if non-zero, this is the component to add the call-out to. If - this is a nullptr, the call-out will be added to the desktop. + @param parentComponent if not a nullptr, this is the component to add the call-out to. + If this is a nullptr, the call-out will be added to the desktop. */ static CallOutBox& launchAsynchronously (Component* contentComponent, const Rectangle& areaToPointTo, diff --git a/modules/juce_gui_basics/windows/juce_DialogWindow.h b/modules/juce_gui_basics/windows/juce_DialogWindow.h index 637faae036..ab927e2bc0 100644 --- a/modules/juce_gui_basics/windows/juce_DialogWindow.h +++ b/modules/juce_gui_basics/windows/juce_DialogWindow.h @@ -171,7 +171,7 @@ public: be before calling this method. The component won't be deleted by this call, so you can re-use it or delete it afterwards - @param componentToCentreAround if this is non-zero, it indicates a component that + @param componentToCentreAround if this is not a nullptr, it indicates a component that you'd like to show this dialog box in front of. See the DocumentWindow::centreAroundComponent() method for more info on this parameter @@ -217,7 +217,7 @@ public: be before calling this method. The component won't be deleted by this call, so you can re-use it or delete it afterwards - @param componentToCentreAround if this is non-zero, it indicates a component that + @param componentToCentreAround if this is not a nullptr, it indicates a component that you'd like to show this dialog box in front of. See the DocumentWindow::centreAroundComponent() method for more info on this parameter diff --git a/modules/juce_gui_basics/windows/juce_DocumentWindow.h b/modules/juce_gui_basics/windows/juce_DocumentWindow.h index 90972c2c3a..ea31eb46b6 100644 --- a/modules/juce_gui_basics/windows/juce_DocumentWindow.h +++ b/modules/juce_gui_basics/windows/juce_DocumentWindow.h @@ -141,9 +141,9 @@ public: @param menuBarModel this specifies a MenuBarModel that should be used to generate the contents of a menu bar that will be placed just below the title bar, and just above any content - component. If this value is zero, any existing menu bar - will be removed from the component; if non-zero, one will - be added if it's required. + component. If this value is a nullptr, any existing menu bar + will be removed from the component; if it is not a nullptr, + one will be added if it's required. @param menuBarHeight the height of the menu bar component, if one is needed. Pass a value of zero or less to use the look-and-feel's default size. */ diff --git a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h index 9fa424f084..14d4f51416 100644 --- a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h +++ b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.h @@ -118,10 +118,10 @@ public: If dontAddNonExistentFiles is true, then each file will be checked and only those that exist will be added. - If filesToAvoid is non-zero, then it is considered to be a zero-terminated array of - pointers to file objects. Any files that appear in this list will not be added to the - menu - the reason for this is that you might have a number of files already open, so - might not want these to be shown in the menu. + If filesToAvoid is not a nullptr, then it is considered to be a zero-terminated array + of pointers to file objects. Any files that appear in this list will not be added to + the menu - the reason for this is that you might have a number of files already open, + so might not want these to be shown in the menu. It returns the number of items that were added. */