From d8a20954003c2cbffa339bd8275491ca5fd2dc01 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Wed, 21 Dec 2022 16:55:07 +0000 Subject: [PATCH] Demos: Fix some compiler warnings --- extras/AudioPerformanceTest/Source/Main.cpp | 2 +- extras/AudioPerformanceTest/Source/MainComponent.h | 4 ---- extras/NetworkGraphicsDemo/Source/Demos.h | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/extras/AudioPerformanceTest/Source/Main.cpp b/extras/AudioPerformanceTest/Source/Main.cpp index 292f9efe33..c893b151f5 100644 --- a/extras/AudioPerformanceTest/Source/Main.cpp +++ b/extras/AudioPerformanceTest/Source/Main.cpp @@ -62,7 +62,7 @@ public: : DocumentWindow (name, Colours::lightgrey, DocumentWindow::allButtons) { setUsingNativeTitleBar (true); - setContentOwned (createMainContentComponent(), true); + setContentOwned (new MainContentComponent(), true); setResizable (false, false); #if JUCE_IOS || JUCE_ANDROID diff --git a/extras/AudioPerformanceTest/Source/MainComponent.h b/extras/AudioPerformanceTest/Source/MainComponent.h index 8785b1cd6d..28dbcdbf96 100644 --- a/extras/AudioPerformanceTest/Source/MainComponent.h +++ b/extras/AudioPerformanceTest/Source/MainComponent.h @@ -271,7 +271,3 @@ private: //============================================================================== JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent) }; - - -// (This function is called by the app startup code to create our main component) -Component* createMainContentComponent() { return new MainContentComponent(); } diff --git a/extras/NetworkGraphicsDemo/Source/Demos.h b/extras/NetworkGraphicsDemo/Source/Demos.h index 3f68326619..4a368ef6d5 100644 --- a/extras/NetworkGraphicsDemo/Source/Demos.h +++ b/extras/NetworkGraphicsDemo/Source/Demos.h @@ -490,7 +490,7 @@ struct MultiLogo : public BackgroundLogo }; //============================================================================== -void createAllDemos (OwnedArray& demos) +inline void createAllDemos (OwnedArray& demos) { demos.add (new FlockDemo()); demos.add (new FlockWithText());