Minor documentation clean-ups: 0 to null/nullptr

While tutoring some people on JUCE, I noticed that there is a pattern in the documentation mentioning 0 when referring to pointers: "will return 0".

Below is a quick-list of macros and methods whose doxy. comments could be modernised, for when you've moment!

  • #define juce_DeclareSingleton
  • AlertWindow::getCustomComponent()
  • AlertWindow::removeCustomComponent()
  • AudioFormat::createWriterFor()
  • ApplicationCommandManager::getCommandForID()
  • Component::findParentComponentOfClass()
  • Toolbar::getItemComponent()
  • TopLevelWindow::centreAroundComponent()
  • TreeView::getItemOnRow()
  • Thread::getCurrentThread()

Ta, will do!

also in Slider::setPopupDisplayEnabled : If you pass 0..

Ta!

same in AudioThumbnailBase::setSource() and AudioThumbnail::setSource() :

You can pass a zero in here to clear the thumbnail.

Thanks, will tidy it up!

there are a few ones in DrawableButton::setImages() (if this is zero/non-zero…)

1 Like

another one in UndoableAction::createCoalescedAction :
If it’s not possible to merge the two actions, the method should return zero.

1 Like

also in AudioFormatManager::createReaderFor() :
If none of the registered formats can open the file, it’ll return 0.

Thank you!