diff --git a/examples/Demo/Source/Demos/AudioLatencyDemo.cpp b/examples/Demo/Source/Demos/AudioLatencyDemo.cpp index 820e793249..36dfef307c 100644 --- a/examples/Demo/Source/Demos/AudioLatencyDemo.cpp +++ b/examples/Demo/Source/Demos/AudioLatencyDemo.cpp @@ -284,7 +284,7 @@ private: : (recordedStart - referenceStart); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LatencyTester); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LatencyTester) }; //============================================================================== diff --git a/examples/Demo/Source/Demos/AudioLiveScrollingDisplay.h b/examples/Demo/Source/Demos/AudioLiveScrollingDisplay.h index 805059bdff..19415ff2df 100644 --- a/examples/Demo/Source/Demos/AudioLiveScrollingDisplay.h +++ b/examples/Demo/Source/Demos/AudioLiveScrollingDisplay.h @@ -76,7 +76,7 @@ public: zeromem (outputChannel, sizeof (float) * (size_t) numSamples); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveScrollingAudioDisplay); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveScrollingAudioDisplay) }; diff --git a/examples/Demo/Source/Demos/AudioPlaybackDemo.cpp b/examples/Demo/Source/Demos/AudioPlaybackDemo.cpp index 57d109884f..f75293b4d2 100644 --- a/examples/Demo/Source/Demos/AudioPlaybackDemo.cpp +++ b/examples/Demo/Source/Demos/AudioPlaybackDemo.cpp @@ -415,7 +415,7 @@ private: showFile (thumbnail->getLastDroppedFile()); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPlaybackDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPlaybackDemo) }; diff --git a/examples/Demo/Source/Demos/AudioSettingsDemo.cpp b/examples/Demo/Source/Demos/AudioSettingsDemo.cpp index c22b1cac11..39527baa58 100644 --- a/examples/Demo/Source/Demos/AudioSettingsDemo.cpp +++ b/examples/Demo/Source/Demos/AudioSettingsDemo.cpp @@ -123,7 +123,7 @@ private: return bits.joinIntoString (", "); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioSettingsDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioSettingsDemo) }; diff --git a/examples/Demo/Source/Demos/CodeEditorDemo.cpp b/examples/Demo/Source/Demos/CodeEditorDemo.cpp index d55dad142b..72d0f28a09 100644 --- a/examples/Demo/Source/Demos/CodeEditorDemo.cpp +++ b/examples/Demo/Source/Demos/CodeEditorDemo.cpp @@ -89,7 +89,7 @@ private: editor->loadContent (fileChooser.getCurrentFile().loadFileAsString()); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CodeEditorDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CodeEditorDemo) }; diff --git a/examples/Demo/Source/Demos/ComponentTransformsDemo.cpp b/examples/Demo/Source/Demos/ComponentTransformsDemo.cpp index e73a5911ff..b78e489ace 100644 --- a/examples/Demo/Source/Demos/ComponentTransformsDemo.cpp +++ b/examples/Demo/Source/Demos/ComponentTransformsDemo.cpp @@ -125,7 +125,7 @@ private: ComponentBoundsConstrainer constrainer; ComponentDragger dragger; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CornerDragger); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CornerDragger) }; OwnedArray draggers; @@ -147,7 +147,7 @@ private: 0, (float) content->getHeight(), p2.x, p2.y)); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentTransformsDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentTransformsDemo) }; diff --git a/examples/Demo/Source/Demos/DialogsDemo.cpp b/examples/Demo/Source/Demos/DialogsDemo.cpp index 16976555bb..55f86b02a9 100644 --- a/examples/Demo/Source/Demos/DialogsDemo.cpp +++ b/examples/Demo/Source/Demos/DialogsDemo.cpp @@ -357,7 +357,7 @@ private: return showWindow (*button, static_cast (i)); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DialogsDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DialogsDemo) }; diff --git a/examples/Demo/Source/Demos/GraphicsDemo.cpp b/examples/Demo/Source/Demos/GraphicsDemo.cpp index 139a4c4344..ba7368ba44 100644 --- a/examples/Demo/Source/Demos/GraphicsDemo.cpp +++ b/examples/Demo/Source/Demos/GraphicsDemo.cpp @@ -668,7 +668,7 @@ private: ListBox listBox; OwnedArray demos; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestListComponent); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestListComponent) }; //============================================================================== @@ -706,7 +706,7 @@ private: Label performanceDisplay; TestListComponent testList; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GraphicsDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GraphicsDemo) }; diff --git a/examples/Demo/Source/Demos/KeyMappingsDemo.cpp b/examples/Demo/Source/Demos/KeyMappingsDemo.cpp index 536144ed84..f46e3bf38a 100644 --- a/examples/Demo/Source/Demos/KeyMappingsDemo.cpp +++ b/examples/Demo/Source/Demos/KeyMappingsDemo.cpp @@ -49,7 +49,7 @@ public: private: KeyMappingEditorComponent keyMappingEditor; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KeyMappingsDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KeyMappingsDemo) }; diff --git a/examples/Demo/Source/Demos/LiveConstantDemo.cpp b/examples/Demo/Source/Demos/LiveConstantDemo.cpp index 64a6ecf15b..e9d364571e 100644 --- a/examples/Demo/Source/Demos/LiveConstantDemo.cpp +++ b/examples/Demo/Source/Demos/LiveConstantDemo.cpp @@ -108,7 +108,7 @@ private: dontSendNotification); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveConstantEditorDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveConstantEditorDemo) }; diff --git a/examples/Demo/Source/Demos/LookAndFeelDemo.cpp b/examples/Demo/Source/Demos/LookAndFeelDemo.cpp index 6570b676b8..494faad1a5 100644 --- a/examples/Demo/Source/Demos/LookAndFeelDemo.cpp +++ b/examples/Demo/Source/Demos/LookAndFeelDemo.cpp @@ -606,7 +606,7 @@ private: lafBox.setSelectedItemIndex (Random::getSystemRandom().nextInt (lafBox.getNumItems())); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeelDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeelDemo) }; diff --git a/examples/Demo/Source/Demos/MDIDemo.cpp b/examples/Demo/Source/Demos/MDIDemo.cpp index b1f57961a8..1113f49330 100644 --- a/examples/Demo/Source/Demos/MDIDemo.cpp +++ b/examples/Demo/Source/Demos/MDIDemo.cpp @@ -116,7 +116,7 @@ private: void textEditorEscapeKeyPressed (TextEditor&) override {} void textEditorFocusLost (TextEditor&) override {} - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Note); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Note) }; @@ -146,7 +146,7 @@ public: } private: - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoMultiDocumentPanel); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoMultiDocumentPanel) }; //============================================================================== @@ -264,7 +264,7 @@ private: addNote (String ("Note ") + String (multiDocumentPanel.getNumDocuments() + 1), "Hello World!"); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MDIDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MDIDemo) }; diff --git a/examples/Demo/Source/Demos/MidiDemo.cpp b/examples/Demo/Source/Demos/MidiDemo.cpp index 96e0c93d2a..f81281e0d1 100644 --- a/examples/Demo/Source/Demos/MidiDemo.cpp +++ b/examples/Demo/Source/Demos/MidiDemo.cpp @@ -259,7 +259,7 @@ private: messageListBox.repaint(); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiDemo) }; diff --git a/examples/Demo/Source/Demos/MultithreadingDemo.cpp b/examples/Demo/Source/Demos/MultithreadingDemo.cpp index d7a81c22d6..e0ecc0a983 100644 --- a/examples/Demo/Source/Demos/MultithreadingDemo.cpp +++ b/examples/Demo/Source/Demos/MultithreadingDemo.cpp @@ -332,7 +332,7 @@ private: demoComponent->setUsingPool (result == 2); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MultithreadingDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MultithreadingDemo) }; diff --git a/examples/Demo/Source/Demos/OpenGLDemo.cpp b/examples/Demo/Source/Demos/OpenGLDemo.cpp index cb36c8eeb5..28533330a2 100644 --- a/examples/Demo/Source/Demos/OpenGLDemo.cpp +++ b/examples/Demo/Source/Demos/OpenGLDemo.cpp @@ -586,7 +586,8 @@ struct OpenGLDemoClasses scale (0.5f), rotationSpeed (0.0f), rotation (0.0f), textureToUse (nullptr) { - MainAppWindow::getMainAppWindow()->setRenderingEngine (0); + if (MainAppWindow* mw = MainAppWindow::getMainAppWindow()) + mw->setRenderingEngine (0); setOpaque (true); addAndMakeVisible (controlsOverlay = new DemoControlsOverlay (*this)); diff --git a/examples/Demo/Source/Demos/OpenGLDemo2D.cpp b/examples/Demo/Source/Demos/OpenGLDemo2D.cpp index 8a6b584dea..0216195f05 100644 --- a/examples/Demo/Source/Demos/OpenGLDemo2D.cpp +++ b/examples/Demo/Source/Demos/OpenGLDemo2D.cpp @@ -37,7 +37,9 @@ public: : fragmentEditorComp (fragmentDocument, nullptr) { setOpaque (true); - MainAppWindow::getMainAppWindow()->setOpenGLRenderingEngine(); + + if (MainAppWindow* mw = MainAppWindow::getMainAppWindow()) + mw->setOpenGLRenderingEngine(); addAndMakeVisible (statusLabel); statusLabel.setJustificationType (Justification::topLeft); diff --git a/examples/Demo/Source/Demos/PropertiesDemo.cpp b/examples/Demo/Source/Demos/PropertiesDemo.cpp index f47634e306..acb083f824 100644 --- a/examples/Demo/Source/Demos/PropertiesDemo.cpp +++ b/examples/Demo/Source/Demos/PropertiesDemo.cpp @@ -169,7 +169,7 @@ public: private: PropertyPanel propertyPanel; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PropertiesDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PropertiesDemo) }; //============================================================================== @@ -235,7 +235,7 @@ private: concertinaPanel.setMaximumPanelSize (panel, panel->getTotalContentHeight()); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConcertinaDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConcertinaDemo) }; diff --git a/examples/Demo/Source/Demos/SystemInfoDemo.cpp b/examples/Demo/Source/Demos/SystemInfoDemo.cpp index 494e2520d6..ab383ecce9 100644 --- a/examples/Demo/Source/Demos/SystemInfoDemo.cpp +++ b/examples/Demo/Source/Demos/SystemInfoDemo.cpp @@ -184,7 +184,7 @@ public: private: TextEditor resultsBox; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SystemInfoDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SystemInfoDemo) }; // This static object will register this demo type in a global list of demos.. diff --git a/examples/Demo/Source/Demos/UnitTestsDemo.cpp b/examples/Demo/Source/Demos/UnitTestsDemo.cpp index 191cc9a4aa..28e2ede66b 100644 --- a/examples/Demo/Source/Demos/UnitTestsDemo.cpp +++ b/examples/Demo/Source/Demos/UnitTestsDemo.cpp @@ -53,7 +53,7 @@ struct UnitTestClasses private: TestRunnerThread& owner; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomTestRunner); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomTestRunner) }; //============================================================================== @@ -93,7 +93,7 @@ struct UnitTestClasses private: UnitTestsDemo& owner; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestRunnerThread); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestRunnerThread) }; @@ -183,7 +183,7 @@ struct UnitTestClasses TextButton startTestButton; TextEditor testResultsBox; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UnitTestsDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UnitTestsDemo) }; }; diff --git a/examples/Demo/Source/Demos/ValueTreesDemo.cpp b/examples/Demo/Source/Demos/ValueTreesDemo.cpp index a097d2b9d1..c9d6729b23 100644 --- a/examples/Demo/Source/Demos/ValueTreesDemo.cpp +++ b/examples/Demo/Source/Demos/ValueTreesDemo.cpp @@ -290,7 +290,7 @@ private: undoManager.beginNewTransaction(); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ValueTreesDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ValueTreesDemo) }; diff --git a/examples/Demo/Source/Demos/WebBrowserDemo.cpp b/examples/Demo/Source/Demos/WebBrowserDemo.cpp index 7da858d9de..c41f20dfd7 100644 --- a/examples/Demo/Source/Demos/WebBrowserDemo.cpp +++ b/examples/Demo/Source/Demos/WebBrowserDemo.cpp @@ -137,7 +137,7 @@ private: webView->goToURL (addressTextBox.getText()); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebBrowserDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebBrowserDemo) }; diff --git a/examples/Demo/Source/Demos/WidgetsDemo.cpp b/examples/Demo/Source/Demos/WidgetsDemo.cpp index 2f8ef0d29a..525c36db1f 100644 --- a/examples/Demo/Source/Demos/WidgetsDemo.cpp +++ b/examples/Demo/Source/Demos/WidgetsDemo.cpp @@ -1547,7 +1547,7 @@ public: private: DemoTabbedComponent tabs; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WidgetsDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WidgetsDemo) }; // This static object will register this demo type in a global list of demos.. diff --git a/examples/Demo/Source/Demos/WindowsDemo.cpp b/examples/Demo/Source/Demos/WindowsDemo.cpp index 4e9d452373..cfb5a6eaca 100644 --- a/examples/Demo/Source/Demos/WindowsDemo.cpp +++ b/examples/Demo/Source/Demos/WindowsDemo.cpp @@ -323,7 +323,7 @@ private: closeAllWindows(); } - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsDemo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsDemo) }; // This static object will register this demo type in a global list of demos.. diff --git a/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp b/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp index 00298215a7..7089585d00 100644 --- a/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp @@ -75,7 +75,7 @@ struct AudioVisualiserComponent::ChannelInfo Range value; int nextSample, subSample; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChannelInfo); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChannelInfo) }; //============================================================================== diff --git a/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.h b/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.h index 644fdac113..6186bd5608 100644 --- a/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.h +++ b/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.h @@ -128,7 +128,7 @@ private: void timerCallback() override; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioVisualiserComponent); + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioVisualiserComponent) };