Minor documentation clean-ups: 0 to null/nullptr


#1

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()

#2

Ta, will do!


#3

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


#4

Ta!


#5

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

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


#6

Thanks, will tidy it up!


#7

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


#8

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


#9

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


#10

Thank you!