Browse Source

Fixed some findParentComponentOfClass() calls.

tags/2021-05-28
jules 13 years ago
parent
commit
67c1ad6d4a
6 changed files with 11 additions and 11 deletions
  1. +2
    -2
      extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp
  2. +4
    -4
      extras/audio plugin host/Source/GraphEditorPanel.cpp
  3. +1
    -1
      extras/the jucer/src/model/components/jucer_JucerComponentHandler.h
  4. +1
    -1
      extras/the jucer/src/properties/jucer_PositionPropertyBase.h
  5. +2
    -2
      extras/the jucer/src/ui/jucer_EditingPanelBase.cpp
  6. +1
    -1
      extras/the jucer/src/ui/jucer_JucerDocumentHolder.cpp

+ 2
- 2
extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp View File

@@ -118,9 +118,9 @@ public:
void filesDropped (const StringArray& files, int /*x*/, int /*y*/)
{
AudioDemoPlaybackPage* demoPage = findParentComponentOfClass ((AudioDemoPlaybackPage*) 0);
AudioDemoPlaybackPage* demoPage = findParentComponentOfClass<AudioDemoPlaybackPage>();
if (demoPage != 0)
if (demoPage != nullptr)
demoPage->showFile (File (files[0]));
}


+ 4
- 4
extras/audio plugin host/Source/GraphEditorPanel.cpp View File

@@ -202,7 +202,7 @@ private:
GraphEditorPanel* getGraphPanel() const noexcept
{
return findParentComponentOfClass ((GraphEditorPanel*) nullptr);
return findParentComponentOfClass<GraphEditorPanel>();
}
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PinComponent);
@@ -450,7 +450,7 @@ private:
GraphEditorPanel* getGraphPanel() const noexcept
{
return findParentComponentOfClass ((GraphEditorPanel*) nullptr);
return findParentComponentOfClass<GraphEditorPanel>();
}
FilterComponent (const FilterComponent&);
@@ -688,7 +688,7 @@ private:
GraphEditorPanel* getGraphPanel() const noexcept
{
return findParentComponentOfClass ((GraphEditorPanel*) nullptr);
return findParentComponentOfClass<GraphEditorPanel>();
}
void getDistancesFromEnds (int x, int y, double& distanceFromStart, double& distanceFromEnd) const
@@ -730,7 +730,7 @@ void GraphEditorPanel::mouseDown (const MouseEvent& e)
{
PopupMenu m;
MainHostWindow* const mainWindow = findParentComponentOfClass ((MainHostWindow*) nullptr);
MainHostWindow* const mainWindow = findParentComponentOfClass<MainHostWindow>();
if (mainWindow != nullptr)
{


+ 1
- 1
extras/the jucer/src/model/components/jucer_JucerComponentHandler.h View File

@@ -210,7 +210,7 @@ private:
void buttonClicked()
{
MainWindow* const mw = findParentComponentOfClass ((MainWindow*) 0);
MainWindow* const mw = findParentComponentOfClass<MainWindow>();
jassert (mw != 0);
if (mw != 0)


+ 1
- 1
extras/the jucer/src/properties/jucer_PositionPropertyBase.h View File

@@ -342,7 +342,7 @@ public:
Rectangle<int> parentArea;
if (component->findParentComponentOfClass ((ComponentLayoutEditor*) 0) != 0)
if (component->findParentComponentOfClass<ComponentLayoutEditor>() != 0)
{
parentArea.setSize (component->getParentWidth(), component->getParentHeight());
}


+ 2
- 2
extras/the jucer/src/ui/jucer_EditingPanelBase.cpp View File

@@ -129,7 +129,7 @@ private:
void mouseDown (const MouseEvent& e)
{
Viewport* viewport = findParentComponentOfClass ((Viewport*) 0);
Viewport* viewport = findParentComponentOfClass<Viewport>();
if (viewport != 0)
{
@@ -140,7 +140,7 @@ private:
void mouseDrag (const MouseEvent& e)
{
Viewport* viewport = findParentComponentOfClass ((Viewport*) 0);
Viewport* viewport = findParentComponentOfClass<Viewport>();
if (viewport != 0)
{


+ 1
- 1
extras/the jucer/src/ui/jucer_JucerDocumentHolder.cpp View File

@@ -412,7 +412,7 @@ JucerDocumentHolder::~JucerDocumentHolder()
bool JucerDocumentHolder::close()
{
MainWindow* const mw = findParentComponentOfClass ((MainWindow*) 0);
MainWindow* const mw = findParentComponentOfClass<MainWindow>();
if (mw != 0)
return mw->closeDocument (this);


Loading…
Cancel
Save