| @@ -118,9 +118,9 @@ public: | |||||
| void filesDropped (const StringArray& files, int /*x*/, int /*y*/) | 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])); | demoPage->showFile (File (files[0])); | ||||
| } | } | ||||
| @@ -202,7 +202,7 @@ private: | |||||
| GraphEditorPanel* getGraphPanel() const noexcept | GraphEditorPanel* getGraphPanel() const noexcept | ||||
| { | { | ||||
| return findParentComponentOfClass ((GraphEditorPanel*) nullptr); | |||||
| return findParentComponentOfClass<GraphEditorPanel>(); | |||||
| } | } | ||||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PinComponent); | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PinComponent); | ||||
| @@ -450,7 +450,7 @@ private: | |||||
| GraphEditorPanel* getGraphPanel() const noexcept | GraphEditorPanel* getGraphPanel() const noexcept | ||||
| { | { | ||||
| return findParentComponentOfClass ((GraphEditorPanel*) nullptr); | |||||
| return findParentComponentOfClass<GraphEditorPanel>(); | |||||
| } | } | ||||
| FilterComponent (const FilterComponent&); | FilterComponent (const FilterComponent&); | ||||
| @@ -688,7 +688,7 @@ private: | |||||
| GraphEditorPanel* getGraphPanel() const noexcept | GraphEditorPanel* getGraphPanel() const noexcept | ||||
| { | { | ||||
| return findParentComponentOfClass ((GraphEditorPanel*) nullptr); | |||||
| return findParentComponentOfClass<GraphEditorPanel>(); | |||||
| } | } | ||||
| void getDistancesFromEnds (int x, int y, double& distanceFromStart, double& distanceFromEnd) const | void getDistancesFromEnds (int x, int y, double& distanceFromStart, double& distanceFromEnd) const | ||||
| @@ -730,7 +730,7 @@ void GraphEditorPanel::mouseDown (const MouseEvent& e) | |||||
| { | { | ||||
| PopupMenu m; | PopupMenu m; | ||||
| MainHostWindow* const mainWindow = findParentComponentOfClass ((MainHostWindow*) nullptr); | |||||
| MainHostWindow* const mainWindow = findParentComponentOfClass<MainHostWindow>(); | |||||
| if (mainWindow != nullptr) | if (mainWindow != nullptr) | ||||
| { | { | ||||
| @@ -210,7 +210,7 @@ private: | |||||
| void buttonClicked() | void buttonClicked() | ||||
| { | { | ||||
| MainWindow* const mw = findParentComponentOfClass ((MainWindow*) 0); | |||||
| MainWindow* const mw = findParentComponentOfClass<MainWindow>(); | |||||
| jassert (mw != 0); | jassert (mw != 0); | ||||
| if (mw != 0) | if (mw != 0) | ||||
| @@ -342,7 +342,7 @@ public: | |||||
| Rectangle<int> parentArea; | Rectangle<int> parentArea; | ||||
| if (component->findParentComponentOfClass ((ComponentLayoutEditor*) 0) != 0) | |||||
| if (component->findParentComponentOfClass<ComponentLayoutEditor>() != 0) | |||||
| { | { | ||||
| parentArea.setSize (component->getParentWidth(), component->getParentHeight()); | parentArea.setSize (component->getParentWidth(), component->getParentHeight()); | ||||
| } | } | ||||
| @@ -129,7 +129,7 @@ private: | |||||
| void mouseDown (const MouseEvent& e) | void mouseDown (const MouseEvent& e) | ||||
| { | { | ||||
| Viewport* viewport = findParentComponentOfClass ((Viewport*) 0); | |||||
| Viewport* viewport = findParentComponentOfClass<Viewport>(); | |||||
| if (viewport != 0) | if (viewport != 0) | ||||
| { | { | ||||
| @@ -140,7 +140,7 @@ private: | |||||
| void mouseDrag (const MouseEvent& e) | void mouseDrag (const MouseEvent& e) | ||||
| { | { | ||||
| Viewport* viewport = findParentComponentOfClass ((Viewport*) 0); | |||||
| Viewport* viewport = findParentComponentOfClass<Viewport>(); | |||||
| if (viewport != 0) | if (viewport != 0) | ||||
| { | { | ||||
| @@ -412,7 +412,7 @@ JucerDocumentHolder::~JucerDocumentHolder() | |||||
| bool JucerDocumentHolder::close() | bool JucerDocumentHolder::close() | ||||
| { | { | ||||
| MainWindow* const mw = findParentComponentOfClass ((MainWindow*) 0); | |||||
| MainWindow* const mw = findParentComponentOfClass<MainWindow>(); | |||||
| if (mw != 0) | if (mw != 0) | ||||
| return mw->closeDocument (this); | return mw->closeDocument (this); | ||||