From 6dc002b89c3ff5782be5480c3dd6f3deb1ddad8d Mon Sep 17 00:00:00 2001 From: reuk Date: Fri, 24 Jun 2022 19:06:58 +0100 Subject: [PATCH] Demos: Fix missing prototype warning --- examples/DemoRunner/Source/Demos/DemoPIPs1.cpp | 3 --- examples/DemoRunner/Source/Demos/JUCEDemos.h | 7 +++++-- examples/Utilities/ChildProcessDemo.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp b/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp index d5442ec10a..b1c2fe0b33 100644 --- a/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp +++ b/examples/DemoRunner/Source/Demos/DemoPIPs1.cpp @@ -55,9 +55,6 @@ #include "../../../DSP/WaveShaperTanhDemo.h" #include "../../../Utilities/Box2DDemo.h" -#if JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX || JUCE_BSD - #include "../../../Utilities/ChildProcessDemo.h" -#endif #include "../../../Utilities/CryptographyDemo.h" #include "../../../Utilities/JavaScriptDemo.h" #include "../../../Utilities/LiveConstantDemo.h" diff --git a/examples/DemoRunner/Source/Demos/JUCEDemos.h b/examples/DemoRunner/Source/Demos/JUCEDemos.h index 1c6ac037ed..154b70c282 100644 --- a/examples/DemoRunner/Source/Demos/JUCEDemos.h +++ b/examples/DemoRunner/Source/Demos/JUCEDemos.h @@ -61,8 +61,6 @@ void registerDemos_One() noexcept; void registerDemos_Two() noexcept; //============================================================================== -// used by child-process demo -bool invokeChildProcessDemo (const String& commandLine); void registerAllDemos() noexcept; Component* createIntroDemo(); @@ -76,3 +74,8 @@ extern std::unique_ptr sharedAudioDeviceManager; AudioDeviceManager& getSharedAudioDeviceManager (int numInputChannels = -1, int numOutputChannels = -1); ApplicationCommandManager& getGlobalCommandManager(); + +// A function in this demo is called from the DemoRunner's entry point +#if JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX || JUCE_BSD + #include "../../../Utilities/ChildProcessDemo.h" +#endif diff --git a/examples/Utilities/ChildProcessDemo.h b/examples/Utilities/ChildProcessDemo.h index d6f4e0b0c4..3c9071949b 100644 --- a/examples/Utilities/ChildProcessDemo.h +++ b/examples/Utilities/ChildProcessDemo.h @@ -303,7 +303,7 @@ public: child process to launch when the command line parameters indicate that we're being asked to run as a child process. */ -bool invokeChildProcessDemo (const String& commandLine) +inline bool invokeChildProcessDemo (const String& commandLine) { auto worker = std::make_unique();