diff --git a/examples/DemoRunner/Source/UI/DemoContentComponent.cpp b/examples/DemoRunner/Source/UI/DemoContentComponent.cpp index 6a23f5894a..25c7812fbb 100644 --- a/examples/DemoRunner/Source/UI/DemoContentComponent.cpp +++ b/examples/DemoRunner/Source/UI/DemoContentComponent.cpp @@ -93,7 +93,7 @@ struct CodeContent : public Component #endif //============================================================================== -DemoContentComponent::DemoContentComponent (Component& mainComponent, std::function callback) +DemoContentComponent::DemoContentComponent (Component& mainComponent, std::function callback) : TabbedComponent (TabbedButtonBar::Orientation::TabsAtTop), demoChangedCallback (std::move (callback)) { diff --git a/examples/DemoRunner/Source/UI/DemoContentComponent.h b/examples/DemoRunner/Source/UI/DemoContentComponent.h index 7475e66257..5921a3e276 100644 --- a/examples/DemoRunner/Source/UI/DemoContentComponent.h +++ b/examples/DemoRunner/Source/UI/DemoContentComponent.h @@ -28,7 +28,7 @@ struct CodeContent; class DemoContentComponent : public TabbedComponent { public: - DemoContentComponent (Component& mainComponent, std::function demoChangedCallback); + DemoContentComponent (Component& mainComponent, std::function demoChangedCallback); ~DemoContentComponent() override; void resized() override; @@ -43,7 +43,7 @@ public: void setTabBarIndent (int indent) noexcept { tabBarIndent = indent; } private: - std::function demoChangedCallback; + std::function demoChangedCallback; std::unique_ptr demoContent; diff --git a/extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h b/extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h index c1fc29efc4..1db3f877b3 100644 --- a/extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h +++ b/extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h @@ -85,7 +85,7 @@ class TemplateComponent : public Component { public: TemplateComponent (const NewProjectTemplates::ProjectTemplate& temp, - std::function)>&& createdCallback) + std::function)>&& createdCallback) : projectTemplate (temp), projectCreatedCallback (std::move (createdCallback)), header (projectTemplate.displayName, projectTemplate.description, projectTemplate.icon) @@ -143,7 +143,7 @@ public: private: NewProjectTemplates::ProjectTemplate projectTemplate; - std::function)> projectCreatedCallback; + std::function)> projectCreatedCallback; ItemHeader header; TextButton createProjectButton { "Create Project..." }; @@ -240,7 +240,7 @@ private: class ExampleComponent : public Component { public: - ExampleComponent (const File& f, std::function selectedCallback) + ExampleComponent (const File& f, std::function selectedCallback) : exampleFile (f), metadata (parseJUCEHeaderMetadata (exampleFile)), exampleSelectedCallback (std::move (selectedCallback)), @@ -290,7 +290,7 @@ private: File exampleFile; var metadata; - std::function exampleSelectedCallback; + std::function exampleSelectedCallback; ItemHeader header; diff --git a/extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.cpp b/extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.cpp index 84b274f8e2..1565e368a9 100644 --- a/extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.cpp +++ b/extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.cpp @@ -57,7 +57,7 @@ static File findExampleFile (int dirIndex, int index) return ProjucerApplication::getSortedExampleFilesInDirectory (dir)[index]; } -static std::unique_ptr createExampleProjectsTab (ContentComponent& content, std::function cb) +static std::unique_ptr createExampleProjectsTab (ContentComponent& content, std::function cb) { StringArray exampleCategories; std::vector examples; @@ -120,7 +120,7 @@ static StringArray getAllTemplateNamesForCategory (const String& category) } static std::unique_ptr createProjectTemplatesTab (ContentComponent& content, - std::function&&)>&& cb) + std::function&&)>&& cb) { auto categories = getAllTemplateCategoryStrings(); @@ -150,8 +150,8 @@ static std::unique_ptr createProjectTemplatesTab (ContentComponent& c struct ProjectTemplatesAndExamples : public TabbedComponent { ProjectTemplatesAndExamples (ContentComponent& c, - std::function&&)>&& newProjectCb, - std::function&& exampleCb) + std::function&&)>&& newProjectCb, + std::function&& exampleCb) : TabbedComponent (TabbedButtonBar::Orientation::TabsAtTop), content (c), exampleSelectedCallback (std::move (exampleCb)) @@ -222,12 +222,12 @@ private: }; ContentComponent& content; - std::function exampleSelectedCallback; + std::function exampleSelectedCallback; }; //============================================================================== -StartPageComponent::StartPageComponent (std::function&&)>&& newProjectCb, - std::function&& exampleCb) +StartPageComponent::StartPageComponent (std::function&&)>&& newProjectCb, + std::function&& exampleCb) : content (std::make_unique()), tabs (std::make_unique (*content, std::move (newProjectCb), std::move (exampleCb))) { diff --git a/extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.h b/extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.h index 4961f1b9f7..aa9423421b 100644 --- a/extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.h +++ b/extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.h @@ -25,8 +25,8 @@ struct ProjectTemplatesAndExamples; class StartPageComponent : public Component { public: - StartPageComponent (std::function&&)>&& newProjectCb, - std::function&& exampleCb); + StartPageComponent (std::function&&)>&& newProjectCb, + std::function&& exampleCb); void paint (Graphics& g) override; void resized() override; diff --git a/extras/Projucer/Source/Application/StartPage/jucer_StartPageTreeHolder.h b/extras/Projucer/Source/Application/StartPage/jucer_StartPageTreeHolder.h index dde9be8a3f..021d4a57f9 100644 --- a/extras/Projucer/Source/Application/StartPage/jucer_StartPageTreeHolder.h +++ b/extras/Projucer/Source/Application/StartPage/jucer_StartPageTreeHolder.h @@ -25,7 +25,7 @@ public: enum class Open { no, yes }; StartPageTreeHolder (const StringArray& headerNames, const std::vector& itemNames, - std::function&& selectedCallback, Open shouldBeOpen) + std::function&& selectedCallback, Open shouldBeOpen) : headers (headerNames), items (itemNames), itemSelectedCallback (std::move (selectedCallback)) @@ -160,7 +160,7 @@ private: StringArray headers; std::vector items; - std::function itemSelectedCallback; + std::function itemSelectedCallback; //============================================================================== JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StartPageTreeHolder) diff --git a/extras/Projucer/Source/Application/UserAccount/jucer_LicenseQueryThread.h b/extras/Projucer/Source/Application/UserAccount/jucer_LicenseQueryThread.h index 89a62763fb..537583f5d1 100644 --- a/extras/Projucer/Source/Application/UserAccount/jucer_LicenseQueryThread.h +++ b/extras/Projucer/Source/Application/UserAccount/jucer_LicenseQueryThread.h @@ -24,7 +24,7 @@ class LicenseQueryThread : public Thread { public: LicenseQueryThread (const String& userEmail, const String& userPassword, - std::function&& cb) + std::function&& cb) : Thread ("LicenseQueryThread"), email (userEmail), password (userPassword), @@ -266,7 +266,7 @@ private: //============================================================================== const String email, password; - const std::function completionCallback; + const std::function completionCallback; //============================================================================== JUCE_DECLARE_WEAK_REFERENCEABLE (LicenseQueryThread) diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index f9c96be95a..fd35bb6769 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -62,7 +62,7 @@ namespace Vst2 #endif #if JUCE_LINUX - std::vector>> getFdReadCallbacks(); + std::vector>> getFdReadCallbacks(); #endif namespace juce @@ -1587,7 +1587,7 @@ private: #if JUCE_WINDOWS WindowsHooks hooks; #elif JUCE_LINUX - std::unordered_map> fdCallbackMap; + std::unordered_map> fdCallbackMap; ::Display* display = XWindowSystem::getInstance()->getDisplay(); diff --git a/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h b/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h index 3ab05fd55c..733104f7f9 100644 --- a/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h +++ b/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h @@ -293,7 +293,7 @@ public: #ifndef DOXYGEN // @internal static AudioProcessor::WrapperType jucePlugInClientCurrentWrapperType; - static std::function jucePlugInIsRunningInAudioSuiteFn; + static std::function jucePlugInIsRunningInAudioSuiteFn; #endif private: diff --git a/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp b/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp index 6c92ad3eb7..e325d2f21a 100644 --- a/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp +++ b/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp @@ -28,7 +28,7 @@ namespace juce { AudioProcessor::WrapperType PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_Undefined; -std::function PluginHostType::jucePlugInIsRunningInAudioSuiteFn = nullptr; +std::function PluginHostType::jucePlugInIsRunningInAudioSuiteFn = nullptr; #if JucePlugin_Build_Unity bool juce_isRunningInUnity() { return PluginHostType::getPluginLoadedAs() == AudioProcessor::wrapperType_Unity; } diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormat.h b/modules/juce_audio_processors/format/juce_AudioPluginFormat.h index 059523b718..70ae1573c5 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormat.h +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormat.h @@ -67,7 +67,7 @@ public: String& errorMessage); /** A callback lambda that is passed to createPluginInstanceAsync() */ - using PluginCreationCallback = std::function, const String&)>; + using PluginCreationCallback = std::function, const String&)>; /** Tries to recreate a type from a previously generated PluginDescription. When the plugin has been created, it will be passed to the caller via an diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 5c8ba08bce..25445fc7ca 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -1167,7 +1167,7 @@ public: Unknown = -1 }; - std::function curve; // a function which represents your curve (such as an eq) + std::function curve; // a function which represents your curve (such as an eq) Range xRange, yRange; // the data range of your curve // For some curve types, your plug-in may already measure the current input and output values. diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp b/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp index 2f5867ae4e..291b563bf8 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp @@ -21,8 +21,8 @@ namespace juce AudioParameterBool::AudioParameterBool (const String& idToUse, const String& nameToUse, bool def, const String& labelToUse, - std::function stringFromBool, - std::function boolFromString) + std::function stringFromBool, + std::function boolFromString) : RangedAudioParameter (idToUse, nameToUse, labelToUse), value (def ? 1.0f : 0.0f), defaultValue (value), diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterBool.h b/modules/juce_audio_processors/utilities/juce_AudioParameterBool.h index 285327b439..abe6406981 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterBool.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterBool.h @@ -44,8 +44,8 @@ public: */ AudioParameterBool (const String& parameterID, const String& parameterName, bool defaultValue, const String& parameterLabel = String(), - std::function stringFromBool = nullptr, - std::function boolFromString = nullptr); + std::function stringFromBool = nullptr, + std::function boolFromString = nullptr); /** Destructor. */ ~AudioParameterBool() override; @@ -82,8 +82,8 @@ private: const NormalisableRange range { 0.0f, 1.0f, 1.0f }; std::atomic value; const float defaultValue; - std::function stringFromBoolFunction; - std::function boolFromStringFunction; + std::function stringFromBoolFunction; + std::function boolFromStringFunction; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioParameterBool) }; diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp index ece7a159f3..4fd4d0ad1d 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp @@ -21,8 +21,8 @@ namespace juce AudioParameterChoice::AudioParameterChoice (const String& idToUse, const String& nameToUse, const StringArray& c, int def, const String& labelToUse, - std::function stringFromIndex, - std::function indexFromString) + std::function stringFromIndex, + std::function indexFromString) : RangedAudioParameter (idToUse, nameToUse, labelToUse), choices (c), range ([this] { diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h index bb59436a88..76d5a41efe 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h @@ -48,8 +48,8 @@ public: const StringArray& choices, int defaultItemIndex, const String& parameterLabel = String(), - std::function stringFromIndex = nullptr, - std::function indexFromString = nullptr); + std::function stringFromIndex = nullptr, + std::function indexFromString = nullptr); /** Destructor. */ ~AudioParameterChoice() override; @@ -94,8 +94,8 @@ private: const NormalisableRange range; std::atomic value; const float defaultValue; - std::function stringFromIndexFunction; - std::function indexFromStringFunction; + std::function stringFromIndexFunction; + std::function indexFromStringFunction; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioParameterChoice) }; diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp b/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp index 3a6b5f50d1..16fac60f70 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp @@ -22,8 +22,8 @@ namespace juce AudioParameterFloat::AudioParameterFloat (const String& idToUse, const String& nameToUse, NormalisableRange r, float def, const String& labelToUse, Category categoryToUse, - std::function stringFromValue, - std::function valueFromString) + std::function stringFromValue, + std::function valueFromString) : RangedAudioParameter (idToUse, nameToUse, labelToUse, categoryToUse), range (r), value (def), defaultValue (def), stringFromValueFunction (stringFromValue), diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h b/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h index 290d4a8735..18c70ff29d 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h @@ -51,8 +51,8 @@ public: float defaultValue, const String& parameterLabel = String(), Category parameterCategory = AudioProcessorParameter::genericParameter, - std::function stringFromValue = nullptr, - std::function valueFromString = nullptr); + std::function stringFromValue = nullptr, + std::function valueFromString = nullptr); /** Creates a AudioParameterFloat with an ID, name, and range. On creation, its value is set to the default value. @@ -100,8 +100,8 @@ private: std::atomic value; const float defaultValue; - std::function stringFromValueFunction; - std::function valueFromStringFunction; + std::function stringFromValueFunction; + std::function valueFromStringFunction; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioParameterFloat) }; diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp index bd2c69dee9..8b467d9a29 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp @@ -22,8 +22,8 @@ namespace juce AudioParameterInt::AudioParameterInt (const String& idToUse, const String& nameToUse, int minValue, int maxValue, int def, const String& labelToUse, - std::function stringFromInt, - std::function intFromString) + std::function stringFromInt, + std::function intFromString) : RangedAudioParameter (idToUse, nameToUse, labelToUse), range ([minValue, maxValue] { diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h index c68b4af111..5e0948a150 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h @@ -49,8 +49,8 @@ public: int minValue, int maxValue, int defaultValue, const String& parameterLabel = String(), - std::function stringFromInt = nullptr, - std::function intFromString = nullptr); + std::function stringFromInt = nullptr, + std::function intFromString = nullptr); /** Destructor. */ ~AudioParameterInt() override; @@ -90,8 +90,8 @@ private: const NormalisableRange range; std::atomic value; const float defaultValue; - std::function stringFromIntFunction; - std::function intFromStringFunction; + std::function stringFromIntFunction; + std::function intFromStringFunction; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioParameterInt) }; diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp index 8a4bff5cb2..137466b691 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp @@ -25,8 +25,8 @@ AudioProcessorValueTreeState::Parameter::Parameter (const String& parameterID, const String& labelText, NormalisableRange valueRange, float defaultParameterValue, - std::function valueToTextFunction, - std::function textToValueFunction, + std::function valueToTextFunction, + std::function textToValueFunction, bool isMetaParameter, bool isAutomatableParameter, bool isDiscrete, @@ -38,7 +38,7 @@ AudioProcessorValueTreeState::Parameter::Parameter (const String& parameterID, defaultParameterValue, labelText, parameterCategory, - valueToTextFunction == nullptr ? std::function() + valueToTextFunction == nullptr ? std::function() : [valueToTextFunction](float v, int) { return valueToTextFunction (v); }, std::move (textToValueFunction)), unsnappedDefault (valueRange.convertTo0to1 (defaultParameterValue)), @@ -261,8 +261,8 @@ RangedAudioParameter* AudioProcessorValueTreeState::createAndAddParameter (const const String& labelText, NormalisableRange range, float defaultVal, - std::function valueToTextFunction, - std::function textToValueFunction, + std::function valueToTextFunction, + std::function textToValueFunction, bool isMetaParameter, bool isAutomatableParameter, bool isDiscreteParameter, diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h index eac704ceb2..8257c3d708 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h @@ -254,8 +254,8 @@ public: const String& labelText, NormalisableRange valueRange, float defaultValue, - std::function valueToTextFunction, - std::function textToValueFunction, + std::function valueToTextFunction, + std::function textToValueFunction, bool isMetaParameter = false, bool isAutomatableParameter = true, bool isDiscrete = false, @@ -394,8 +394,8 @@ public: const String& labelText, NormalisableRange valueRange, float defaultValue, - std::function valueToTextFunction, - std::function textToValueFunction, + std::function valueToTextFunction, + std::function textToValueFunction, bool isMetaParameter = false, bool isAutomatableParameter = true, bool isDiscrete = false, @@ -514,7 +514,7 @@ private: @endcode */ JUCE_DEPRECATED (std::unique_ptr createParameter (const String&, const String&, const String&, NormalisableRange, - float, std::function, std::function, + float, std::function, std::function, bool, bool, bool, AudioProcessorParameter::Category, bool)); //============================================================================== diff --git a/modules/juce_audio_processors/utilities/juce_ParameterAttachments.h b/modules/juce_audio_processors/utilities/juce_ParameterAttachments.h index 1960aa28b2..d8ac13a308 100644 --- a/modules/juce_audio_processors/utilities/juce_ParameterAttachments.h +++ b/modules/juce_audio_processors/utilities/juce_ParameterAttachments.h @@ -49,7 +49,7 @@ public: requests a parameter change. */ ParameterAttachment (RangedAudioParameter& parameter, - std::function parameterChangedCallback, + std::function parameterChangedCallback, UndoManager* undoManager = nullptr); /** Destructor. */ @@ -105,7 +105,7 @@ private: RangedAudioParameter& parameter; std::atomic lastValue { 0.0f }; UndoManager* undoManager = nullptr; - std::function setValue; + std::function setValue; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ParameterAttachment) }; diff --git a/modules/juce_blocks_basics/blocks/juce_Block.h b/modules/juce_blocks_basics/blocks/juce_Block.h index 53c91f603a..a8b86f4165 100644 --- a/modules/juce_blocks_basics/blocks/juce_Block.h +++ b/modules/juce_blocks_basics/blocks/juce_Block.h @@ -503,11 +503,11 @@ public: //============================================================================== /** Allows the user to provide a function that will receive log messages from the block. */ - virtual void setLogger (std::function loggingCallback) = 0; + virtual void setLogger (std::function loggingCallback) = 0; /** Sends a firmware update packet to a block, and waits for a reply. Returns an error code. */ virtual bool sendFirmwareUpdatePacket (const uint8* data, uint8 size, - std::function packetAckCallback) = 0; + std::function packetAckCallback) = 0; //============================================================================== /** Interface for objects listening to input data port. */ diff --git a/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp b/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp index 4db66e27f9..05c3ca8115 100644 --- a/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp +++ b/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp @@ -261,9 +261,9 @@ public: } //============================================================================== - std::function logger; + std::function logger; - void setLogger (std::function newLogger) override + void setLogger (std::function newLogger) override { logger = std::move (newLogger); } @@ -447,7 +447,7 @@ public: remoteHeap.handleACKFromDevice (*this, packetCounter); } - bool sendFirmwareUpdatePacket (const uint8* data, uint8 size, std::function callback) override + bool sendFirmwareUpdatePacket (const uint8* data, uint8 size, std::function callback) override { firmwarePacketAckCallback = nullptr; @@ -694,7 +694,7 @@ private: std::unique_ptr program; uint32 programSize = 0; - std::function firmwarePacketAckCallback; + std::function firmwarePacketAckCallback; bool isMaster = false; Block::UID masterUID = {}; diff --git a/modules/juce_blocks_basics/topology/juce_BlockGraph.cpp b/modules/juce_blocks_basics/topology/juce_BlockGraph.cpp index 1fe35a02e0..f0da64db22 100644 --- a/modules/juce_blocks_basics/topology/juce_BlockGraph.cpp +++ b/modules/juce_blocks_basics/topology/juce_BlockGraph.cpp @@ -23,7 +23,7 @@ namespace juce { -BlockGraph::BlockGraph (const BlockTopology t, std::function filterIn) +BlockGraph::BlockGraph (const BlockTopology t, std::function filterIn) : topology (t), filter (std::move (filterIn)) { buildGraph(); diff --git a/modules/juce_blocks_basics/topology/juce_BlockGraph.h b/modules/juce_blocks_basics/topology/juce_BlockGraph.h index 929cf41123..8bea4636a7 100644 --- a/modules/juce_blocks_basics/topology/juce_BlockGraph.h +++ b/modules/juce_blocks_basics/topology/juce_BlockGraph.h @@ -36,7 +36,7 @@ public: /** Creates a BlockGraph object from a BlockTopology with an optional filter function. This will build a block graph of traversal paths for each master. */ - BlockGraph (const BlockTopology topology, std::function filter = nullptr); + BlockGraph (const BlockTopology topology, std::function filter = nullptr); BlockGraph (BlockGraph&&); using BlockTraversalPaths = Array; @@ -58,7 +58,7 @@ private: BlockTraversalPaths traversalPaths; // one path for each master block BlockTopology topology; - std::function filter; + std::function filter; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BlockGraph) }; diff --git a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h index bccb6d9028..458899006e 100644 --- a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h +++ b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h @@ -62,7 +62,7 @@ public: virtual ~DeviceConnection(); virtual bool sendMessageToDevice (const void* data, size_t dataSize) = 0; - std::function handleMessageFromDevice; + std::function handleMessageFromDevice; }; /** For custom transport systems, this represents a connected device */ diff --git a/modules/juce_core/containers/juce_Variant.h b/modules/juce_core/containers/juce_Variant.h index b91e8618f2..e58f3386b0 100644 --- a/modules/juce_core/containers/juce_Variant.h +++ b/modules/juce_core/containers/juce_Variant.h @@ -54,7 +54,7 @@ public: int numArguments; }; - using NativeFunction = std::function; + using NativeFunction = std::function; //============================================================================== /** Creates a void variant. */ diff --git a/modules/juce_core/misc/juce_ConsoleApplication.h b/modules/juce_core/misc/juce_ConsoleApplication.h index 30b2e3b428..ae7b1b2660 100644 --- a/modules/juce_core/misc/juce_ConsoleApplication.h +++ b/modules/juce_core/misc/juce_ConsoleApplication.h @@ -264,7 +264,7 @@ struct ConsoleApplication String longDescription; /** The actual command that should be invoked to perform this action. */ - std::function command; + std::function command; }; //============================================================================== diff --git a/modules/juce_core/misc/juce_RuntimePermissions.h b/modules/juce_core/misc/juce_RuntimePermissions.h index d7a9a44088..caf0803275 100644 --- a/modules/juce_core/misc/juce_RuntimePermissions.h +++ b/modules/juce_core/misc/juce_RuntimePermissions.h @@ -91,7 +91,7 @@ public: //============================================================================== /** Function type of runtime permission request callbacks. */ - using Callback = std::function; + using Callback = std::function; //============================================================================== /** Call this method to request a runtime permission. diff --git a/modules/juce_core/native/juce_android_JNIHelpers.cpp b/modules/juce_core/native/juce_android_JNIHelpers.cpp index 06b6d946c6..5373469141 100644 --- a/modules/juce_core/native/juce_android_JNIHelpers.cpp +++ b/modules/juce_core/native/juce_android_JNIHelpers.cpp @@ -620,7 +620,7 @@ class ActivityLauncher : public FragmentOverlay public: ActivityLauncher (const LocalRef& intentToUse, int requestCodeToUse, - std::function)> && callbackToUse) + std::function)> && callbackToUse) : intent (intentToUse), requestCode (requestCodeToUse), callback (std::move (callbackToUse)) {} @@ -642,11 +642,11 @@ public: private: GlobalRef intent; int requestCode; - std::function)> callback; + std::function)> callback; }; void startAndroidActivityForResult (const LocalRef& intent, int requestCode, - std::function)> && callback) + std::function)> && callback) { auto* activityLauncher = new ActivityLauncher (intent, requestCode, std::move (callback)); activityLauncher->open(); diff --git a/modules/juce_core/native/juce_android_JNIHelpers.h b/modules/juce_core/native/juce_android_JNIHelpers.h index 29b0fbdee8..9e606ba582 100644 --- a/modules/juce_core/native/juce_android_JNIHelpers.h +++ b/modules/juce_core/native/juce_android_JNIHelpers.h @@ -983,7 +983,7 @@ public: //============================================================================== // Allows you to start an activity without requiring to have an activity void startAndroidActivityForResult (const LocalRef& intent, int requestCode, - std::function)> && callback); + std::function)> && callback); //============================================================================== bool androidHasSystemFeature (const String& property); diff --git a/modules/juce_dsp/maths/juce_LookupTable.cpp b/modules/juce_dsp/maths/juce_LookupTable.cpp index 4e93bbe68a..47e921d8d6 100644 --- a/modules/juce_dsp/maths/juce_LookupTable.cpp +++ b/modules/juce_dsp/maths/juce_LookupTable.cpp @@ -28,7 +28,7 @@ LookupTable::LookupTable() } template -LookupTable::LookupTable (const std::function& functionToApproximate, +LookupTable::LookupTable (const std::function& functionToApproximate, size_t numPointsToUse) { initialise (functionToApproximate, numPointsToUse); @@ -36,7 +36,7 @@ LookupTable::LookupTable (const std::function& fun //============================================================================== template -void LookupTable::initialise (const std::function& functionToApproximate, +void LookupTable::initialise (const std::function& functionToApproximate, size_t numPointsToUse) { data.resize (static_cast (getRequiredBufferSize (numPointsToUse))); @@ -64,7 +64,7 @@ void LookupTable::prepare() noexcept } template -void LookupTableTransform::initialise (const std::function& functionToApproximate, +void LookupTableTransform::initialise (const std::function& functionToApproximate, FloatType minInputValueToUse, FloatType maxInputValueToUse, size_t numPoints) @@ -90,7 +90,7 @@ void LookupTableTransform::initialise (const std::function -double LookupTableTransform::calculateMaxRelativeError (const std::function& functionToApproximate, +double LookupTableTransform::calculateMaxRelativeError (const std::function& functionToApproximate, FloatType minInputValue, FloatType maxInputValue, size_t numPoints, diff --git a/modules/juce_dsp/maths/juce_LookupTable.h b/modules/juce_dsp/maths/juce_LookupTable.h index 221119e8b1..2bc90e0081 100644 --- a/modules/juce_dsp/maths/juce_LookupTable.h +++ b/modules/juce_dsp/maths/juce_LookupTable.h @@ -60,7 +60,7 @@ public: mapping from the integer range [0, numPointsToUse - 1]. @param numPointsToUse The number of pre-calculated values stored. */ - LookupTable (const std::function& functionToApproximate, size_t numPointsToUse); + LookupTable (const std::function& functionToApproximate, size_t numPointsToUse); /** Initialises or changes the parameters of a LookupTable object. @@ -72,7 +72,7 @@ public: mapping from the integer range [0, numPointsToUse - 1]. @param numPointsToUse The number of pre-calculated values stored. */ - void initialise (const std::function& functionToApproximate, size_t numPointsToUse); + void initialise (const std::function& functionToApproximate, size_t numPointsToUse); //============================================================================== /** Calculates the approximated value for the given index without range checking. @@ -188,7 +188,7 @@ public: fail for values higher than this. @param numPoints The number of pre-calculated values stored. */ - LookupTableTransform (const std::function& functionToApproximate, + LookupTableTransform (const std::function& functionToApproximate, FloatType minInputValueToUse, FloatType maxInputValueToUse, size_t numPoints) @@ -207,7 +207,7 @@ public: fail for values higher than this. @param numPoints The number of pre-calculated values stored. */ - void initialise (const std::function& functionToApproximate, + void initialise (const std::function& functionToApproximate, FloatType minInputValueToUse, FloatType maxInputValueToUse, size_t numPoints); @@ -301,7 +301,7 @@ public: accuracy of the error calculation. If it's zero then 100 * numPoints will be used. */ - static double calculateMaxRelativeError (const std::function& functionToApproximate, + static double calculateMaxRelativeError (const std::function& functionToApproximate, FloatType minInputValue, FloatType maxInputValue, size_t numPoints, diff --git a/modules/juce_dsp/widgets/juce_Oscillator.h b/modules/juce_dsp/widgets/juce_Oscillator.h index 20ab15f43e..1cfd8192f2 100644 --- a/modules/juce_dsp/widgets/juce_Oscillator.h +++ b/modules/juce_dsp/widgets/juce_Oscillator.h @@ -43,7 +43,7 @@ public: If lookup table is not zero, then the function will be approximated with a lookup table. */ - Oscillator (const std::function& function, + Oscillator (const std::function& function, size_t lookupTableNumPoints = 0) { initialise (function, lookupTableNumPoints); @@ -53,7 +53,7 @@ public: bool isInitialised() const noexcept { return static_cast (generator); } /** Initialises the oscillator with a waveform. */ - void initialise (const std::function& function, + void initialise (const std::function& function, size_t lookupTableNumPoints = 0) { if (lookupTableNumPoints != 0) @@ -232,7 +232,7 @@ public: private: //============================================================================== - std::function generator; + std::function generator; std::unique_ptr> lookupTable; Array rampBuffer; SmoothedValue frequency { static_cast (440.0) }; diff --git a/modules/juce_events/native/juce_linux_EventLoop.h b/modules/juce_events/native/juce_linux_EventLoop.h index c91294c91b..e2be5da552 100644 --- a/modules/juce_events/native/juce_linux_EventLoop.h +++ b/modules/juce_events/native/juce_linux_EventLoop.h @@ -38,7 +38,7 @@ namespace LinuxEventLoop file descriptor. The possible values for this are defined in */ - void registerFdCallback (int fd, std::function readCallback, short eventMask = 1 /*POLLIN*/); + void registerFdCallback (int fd, std::function readCallback, short eventMask = 1 /*POLLIN*/); /** Unregisters a previously registered file descriptor. diff --git a/modules/juce_events/native/juce_linux_Messaging.cpp b/modules/juce_events/native/juce_linux_Messaging.cpp index a45862e2e2..4aa449170e 100644 --- a/modules/juce_events/native/juce_linux_Messaging.cpp +++ b/modules/juce_events/native/juce_linux_Messaging.cpp @@ -117,7 +117,7 @@ public: fdReadCallbacks.reserve (16); } - void registerFdCallback (int fd, std::function&& cb, short eventMask) + void registerFdCallback (int fd, std::function&& cb, short eventMask) { const ScopedLock sl (lock); @@ -145,7 +145,7 @@ public: } { - auto removePredicate = [=] (const std::pair>& cb) { return cb.first == fd; }; + auto removePredicate = [=] (const std::pair>& cb) { return cb.first == fd; }; fdReadCallbacks.erase (std::remove_if (std::begin (fdReadCallbacks), std::end (fdReadCallbacks), removePredicate), std::end (fdReadCallbacks)); @@ -211,7 +211,7 @@ public: poll (&pfds.front(), static_cast (pfds.size()), timeoutMs); } - std::vector>> getFdReadCallbacks() + std::vector>> getFdReadCallbacks() { const ScopedLock sl (lock); return fdReadCallbacks; @@ -223,7 +223,7 @@ public: private: CriticalSection lock; - std::vector>> fdReadCallbacks; + std::vector>> fdReadCallbacks; std::vector pfds; bool shouldDeferModifyingReadCallbacks = false; @@ -311,7 +311,7 @@ bool MessageManager::dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMes } //============================================================================== -void LinuxEventLoop::registerFdCallback (int fd, std::function readCallback, short eventMask) +void LinuxEventLoop::registerFdCallback (int fd, std::function readCallback, short eventMask) { if (auto* runLoop = InternalRunLoop::getInstanceWithoutCreating()) runLoop->registerFdCallback (fd, std::move (readCallback), eventMask); @@ -325,7 +325,7 @@ void LinuxEventLoop::unregisterFdCallback (int fd) } // namespace juce -JUCE_API std::vector>> getFdReadCallbacks() +JUCE_API std::vector>> getFdReadCallbacks() { using namespace juce; diff --git a/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp b/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp index d583ffff03..8a62e812b5 100644 --- a/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp +++ b/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp @@ -279,7 +279,7 @@ int ModalComponentManager::runEventLoopForCurrentComponent() //============================================================================== struct LambdaCallback : public ModalComponentManager::Callback { - LambdaCallback (std::function fn) noexcept : function (fn) {} + LambdaCallback (std::function fn) noexcept : function (fn) {} void modalStateFinished (int result) override { @@ -287,12 +287,12 @@ struct LambdaCallback : public ModalComponentManager::Callback function (result); } - std::function function; + std::function function; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LambdaCallback) }; -ModalComponentManager::Callback* ModalCallbackFunction::create (std::function f) +ModalComponentManager::Callback* ModalCallbackFunction::create (std::function f) { return new LambdaCallback (f); } diff --git a/modules/juce_gui_basics/components/juce_ModalComponentManager.h b/modules/juce_gui_basics/components/juce_ModalComponentManager.h index d1d1e35f82..f4dd260928 100644 --- a/modules/juce_gui_basics/components/juce_ModalComponentManager.h +++ b/modules/juce_gui_basics/components/juce_ModalComponentManager.h @@ -162,7 +162,7 @@ public: @see ModalComponentManager::Callback */ - static ModalComponentManager::Callback* create (std::function); + static ModalComponentManager::Callback* create (std::function); //============================================================================== /** This is a utility function to create a ModalComponentManager::Callback that will diff --git a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp index 69ae48f7fe..99c689dde3 100644 --- a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp @@ -144,7 +144,7 @@ ContentSharer::ContentSharer() {} ContentSharer::~ContentSharer() { clearSingletonInstance(); } void ContentSharer::shareFiles (const Array& files, - std::function callbackToUse) + std::function callbackToUse) { #if JUCE_CONTENT_SHARING startNewShare (callbackToUse); @@ -161,7 +161,7 @@ void ContentSharer::shareFiles (const Array& files, } #if JUCE_CONTENT_SHARING -void ContentSharer::startNewShare (std::function callbackToUse) +void ContentSharer::startNewShare (std::function callbackToUse) { // You should not start another sharing operation before the previous one is finished. // Forcibly stopping a previous sharing operation is rarely a good idea! @@ -182,7 +182,7 @@ void ContentSharer::startNewShare (std::function call #endif void ContentSharer::shareText (const String& text, - std::function callbackToUse) + std::function callbackToUse) { #if JUCE_CONTENT_SHARING startNewShare (callbackToUse); @@ -199,7 +199,7 @@ void ContentSharer::shareText (const String& text, } void ContentSharer::shareImages (const Array& images, - std::function callbackToUse, + std::function callbackToUse, ImageFileFormat* imageFileFormatToUse) { #if JUCE_CONTENT_SHARING @@ -232,7 +232,7 @@ void ContentSharer::filesToSharePrepared() #endif void ContentSharer::shareData (const MemoryBlock& mb, - std::function callbackToUse) + std::function callbackToUse) { #if JUCE_CONTENT_SHARING startNewShare (callbackToUse); @@ -249,7 +249,7 @@ void ContentSharer::sharingFinished (bool succeeded, const String& errorDescript { deleteTemporaryFiles(); - std::function cb; + std::function cb; std::swap (cb, callback); String error (errorDescription); diff --git a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.h b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.h index f7f6ce28d5..20ea286b52 100644 --- a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.h +++ b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.h @@ -45,7 +45,7 @@ public: succeeded. Also, the optional error message is always empty on Android. */ void shareFiles (const Array& files, - std::function callback); + std::function callback); /** Shares the given text. @@ -55,7 +55,7 @@ public: succeeded. Also, the optional error message is always empty on Android. */ void shareText (const String& text, - std::function callback); + std::function callback); /** A convenience function to share an image. This is useful when you have images loaded in memory. The images will be written to temporary files first, so if @@ -79,7 +79,7 @@ public: succeeded. Also, the optional error message is always empty on Android. */ void shareImages (const Array& images, - std::function callback, + std::function callback, ImageFileFormat* imageFileFormatToUse = nullptr); /** A convenience function to share arbitrary data. The data will be written @@ -92,7 +92,7 @@ public: succeeded. Also, the optional error message is always empty on Android. */ void shareData (const MemoryBlock& mb, - std::function callback); + std::function callback); private: ContentSharer(); @@ -100,7 +100,7 @@ private: Array temporaryFiles; - std::function callback; + std::function callback; #if JUCE_CONTENT_SHARING struct Pimpl @@ -113,7 +113,7 @@ private: std::unique_ptr pimpl; Pimpl* createPimpl(); - void startNewShare (std::function); + void startNewShare (std::function); class ContentSharerNativeImpl; friend class ContentSharerNativeImpl; diff --git a/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp b/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp index d9bd949dc5..680b455f9c 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp @@ -161,7 +161,7 @@ bool FileChooser::showDialog (const int flags, FilePreviewComponent* const previ } #endif -void FileChooser::launchAsync (int flags, std::function callback, +void FileChooser::launchAsync (int flags, std::function callback, FilePreviewComponent* previewComp) { // You must specify a callback when using launchAsync @@ -246,7 +246,7 @@ URL FileChooser::getURLResult() const void FileChooser::finished (const Array& asyncResults) { - std::function callback; + std::function callback; std::swap (callback, asyncCallback); results = asyncResults; diff --git a/modules/juce_gui_basics/filebrowser/juce_FileChooser.h b/modules/juce_gui_basics/filebrowser/juce_FileChooser.h index d84e682669..6f1d837da2 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooser.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooser.h @@ -201,7 +201,7 @@ public: the lifetime of the file-chooser. */ void launchAsync (int flags, - std::function, + std::function, FilePreviewComponent* previewComponent = nullptr); //============================================================================== @@ -302,7 +302,7 @@ private: Array results; const bool useNativeDialogBox; const bool treatFilePackagesAsDirs; - std::function asyncCallback; + std::function asyncCallback; //============================================================================== void finished (const Array&); diff --git a/modules/juce_gui_basics/layout/juce_SidePanel.h b/modules/juce_gui_basics/layout/juce_SidePanel.h index 6781a36139..5437fd22fb 100644 --- a/modules/juce_gui_basics/layout/juce_SidePanel.h +++ b/modules/juce_gui_basics/layout/juce_SidePanel.h @@ -182,7 +182,7 @@ public: std::function onPanelMove; /** You can assign a lambda to this callback object and it will be called when the panel is shown or hidden. */ - std::function onPanelShowHide; + std::function onPanelShowHide; private: //============================================================================== diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp index c0c7e439e5..9ff46553b8 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp @@ -1789,7 +1789,7 @@ void PopupMenu::showMenuAsync (const Options& options, ModalComponentManager::Ca showWithOptionalCallback (options, userCallback, false); } -void PopupMenu::showMenuAsync (const Options& options, std::function userCallback) +void PopupMenu::showMenuAsync (const Options& options, std::function userCallback) { showWithOptionalCallback (options, ModalCallbackFunction::create (userCallback), false); } diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.h b/modules/juce_gui_basics/menus/juce_PopupMenu.h index b917dbeaff..86ec5d8493 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.h +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.h @@ -564,7 +564,7 @@ public: /** Runs the menu asynchronously, with a user-provided callback that will receive the result. */ void showMenuAsync (const Options& options, - std::function callback); + std::function callback); //============================================================================== /** Closes any menus that are currently open. diff --git a/modules/juce_gui_basics/widgets/juce_Slider.h b/modules/juce_gui_basics/widgets/juce_Slider.h index 0bc588b9cf..2fe2992937 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.h +++ b/modules/juce_gui_basics/widgets/juce_Slider.h @@ -598,10 +598,10 @@ public: std::function onDragEnd; /** You can assign a lambda that will be used to convert textual values to the slider's normalised position. */ - std::function valueFromTextFunction; + std::function valueFromTextFunction; /** You can assign a lambda that will be used to convert the slider's normalised position to a textual value. */ - std::function textFromValueFunction; + std::function textFromValueFunction; //============================================================================== /** This lets you choose whether double-clicking or single-clicking with a specified diff --git a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp index c979d74baf..4fe1a697c4 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp @@ -428,7 +428,7 @@ struct ShaderPrograms : public ReferenceCountedObject OpenGLShaderProgram::Attribute positionAttribute, colourAttribute; OpenGLShaderProgram::Uniform screenBounds; - std::function onShaderActivated; + std::function onShaderActivated; }; struct MaskedShaderParams diff --git a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.h b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.h index fdba4491fb..bfcd53e44d 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.h +++ b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.h @@ -78,7 +78,7 @@ struct JUCE_API OpenGLGraphicsContextCustomShader /** Optional lambda that will be called when the shader is activated, to allow user code to do setup tasks. */ - std::function onShaderActivated; + std::function onShaderActivated; private: String code, hashName; diff --git a/modules/juce_osc/osc/juce_OSCReceiver.h b/modules/juce_osc/osc/juce_OSCReceiver.h index b3995fd635..45b821ab64 100644 --- a/modules/juce_osc/osc/juce_OSCReceiver.h +++ b/modules/juce_osc/osc/juce_OSCReceiver.h @@ -195,7 +195,7 @@ public: The arguments passed are the pointer to and the data of the buffer that the OSCReceiver has failed to parse. */ - using FormatErrorHandler = std::function; + using FormatErrorHandler = std::function; /** Installs a custom error handler which is called in case the receiver encounters a stream it cannot parse as an OSC bundle or OSC message. diff --git a/modules/juce_product_unlocking/native/juce_android_InAppPurchases.cpp b/modules/juce_product_unlocking/native/juce_android_InAppPurchases.cpp index 039179a030..0916ff1538 100644 --- a/modules/juce_product_unlocking/native/juce_android_InAppPurchases.cpp +++ b/modules/juce_product_unlocking/native/juce_android_InAppPurchases.cpp @@ -501,8 +501,8 @@ private: InAppPurchases& owner; GlobalRef billingClient; - std::queue)>> skuDetailsQueryCallbackQueue, - purchasesListQueryCallbackQueue; + std::queue)>> skuDetailsQueryCallbackQueue, + purchasesListQueryCallbackQueue; //============================================================================== JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl) diff --git a/modules/juce_video/capture/juce_CameraDevice.cpp b/modules/juce_video/capture/juce_CameraDevice.cpp index ac5465d05a..d0a50162bb 100644 --- a/modules/juce_video/capture/juce_CameraDevice.cpp +++ b/modules/juce_video/capture/juce_CameraDevice.cpp @@ -146,7 +146,7 @@ Component* CameraDevice::createViewerComponent() return new ViewerComponent (*this); } -void CameraDevice::takeStillPicture (std::function pictureTakenCallback) +void CameraDevice::takeStillPicture (std::function pictureTakenCallback) { pimpl->takeStillPicture (pictureTakenCallback); } diff --git a/modules/juce_video/capture/juce_CameraDevice.h b/modules/juce_video/capture/juce_CameraDevice.h index 3e7e94e874..61b60502ab 100644 --- a/modules/juce_video/capture/juce_CameraDevice.h +++ b/modules/juce_video/capture/juce_CameraDevice.h @@ -65,7 +65,7 @@ public: int maxWidth = 1024, int maxHeight = 768, bool highQuality = true); - using OpenCameraResultCallback = std::function; + using OpenCameraResultCallback = std::function; /** Asynchronously opens a camera device on iOS (iOS 7+) or Android (API 21+). On other platforms, the function will simply call openDevice(). Upon completion, @@ -119,7 +119,7 @@ public: Android does not support simultaneous video recording and still picture capture. */ - void takeStillPicture (std::function pictureTakenCallback); + void takeStillPicture (std::function pictureTakenCallback); /** Starts recording video to the specified file. @@ -164,7 +164,7 @@ public: /** Set this callback to be notified whenever an error occurs. You may need to close and reopen the device to be able to use it further. */ - std::function onErrorOccurred; + std::function onErrorOccurred; //============================================================================== /** diff --git a/modules/juce_video/native/juce_android_CameraDevice.h b/modules/juce_video/native/juce_android_CameraDevice.h index cdaf32d269..8486dbcb8a 100644 --- a/modules/juce_video/native/juce_android_CameraDevice.h +++ b/modules/juce_video/native/juce_android_CameraDevice.h @@ -477,7 +477,7 @@ private: struct CameraDevice::Pimpl : private ActivityLifecycleCallbacks { - using InternalOpenCameraResultCallback = std::function; + using InternalOpenCameraResultCallback = std::function; Pimpl (CameraDevice& ownerToUse, const String& cameraIdToUse, int /*index*/, int minWidthToUse, int minHeightToUse, int maxWidthToUse, int maxHeightToUse, @@ -553,7 +553,7 @@ struct CameraDevice::Pimpl bool openedOk() const noexcept { return scopedCameraDevice->openedOk(); } - void takeStillPicture (std::function pictureTakenCallbackToUse) + void takeStillPicture (std::function pictureTakenCallbackToUse) { if (pictureTakenCallbackToUse == nullptr || currentCaptureSessionMode == nullptr) { @@ -2926,7 +2926,7 @@ private: CriticalSection listenerLock; ListenerList listeners; - std::function pictureTakenCallback; + std::function pictureTakenCallback; Time firstRecordedFrameTimeMs; bool notifiedOfCameraOpening = false; diff --git a/modules/juce_video/native/juce_android_Video.h b/modules/juce_video/native/juce_android_Video.h index a12586fe24..afc9b7daa5 100644 --- a/modules/juce_video/native/juce_android_Video.h +++ b/modules/juce_video/native/juce_android_Video.h @@ -393,7 +393,7 @@ struct VideoComponent::Pimpl } } - void loadAsync (const URL& url, std::function callback) + void loadAsync (const URL& url, std::function callback) { close(); wasOpen = false; @@ -1742,7 +1742,7 @@ private: #endif GlobalRef surfaceHolderCallback; - std::function loadFinishedCallback; + std::function loadFinishedCallback; bool wasOpen = false; diff --git a/modules/juce_video/native/juce_ios_CameraDevice.h b/modules/juce_video/native/juce_ios_CameraDevice.h index a195235f7a..c85393e191 100644 --- a/modules/juce_video/native/juce_ios_CameraDevice.h +++ b/modules/juce_video/native/juce_ios_CameraDevice.h @@ -23,7 +23,7 @@ struct CameraDevice::Pimpl { - using InternalOpenCameraResultCallback = std::function; + using InternalOpenCameraResultCallback = std::function; Pimpl (CameraDevice& ownerToUse, const String& cameraIdToUse, int /*index*/, int /*minWidth*/, int /*minHeight*/, int /*maxWidth*/, int /*maxHeight*/, @@ -72,7 +72,7 @@ struct CameraDevice::Pimpl bool openedOk() const noexcept { return captureSession.openedOk(); } - void takeStillPicture (std::function pictureTakenCallbackToUse) + void takeStillPicture (std::function pictureTakenCallbackToUse) { if (pictureTakenCallbackToUse == nullptr) { @@ -1214,7 +1214,7 @@ private: CriticalSection listenerLock; ListenerList listeners; - std::function pictureTakenCallback; + std::function pictureTakenCallback; CaptureSession captureSession; diff --git a/modules/juce_video/native/juce_mac_CameraDevice.h b/modules/juce_video/native/juce_mac_CameraDevice.h index 7e964455c8..e27fd39630 100644 --- a/modules/juce_video/native/juce_mac_CameraDevice.h +++ b/modules/juce_video/native/juce_mac_CameraDevice.h @@ -64,7 +64,7 @@ struct CameraDevice::Pimpl //============================================================================== bool openedOk() const noexcept { return openingError.isEmpty(); } - void takeStillPicture (std::function pictureTakenCallbackToUse) + void takeStillPicture (std::function pictureTakenCallbackToUse) { if (pictureTakenCallbackToUse == nullptr) { @@ -368,7 +368,7 @@ private: CriticalSection listenerLock; ListenerList listeners; - std::function pictureTakenCallback = nullptr; + std::function pictureTakenCallback = nullptr; //============================================================================== JUCE_DECLARE_WEAK_REFERENCEABLE (Pimpl) diff --git a/modules/juce_video/native/juce_mac_Video.h b/modules/juce_video/native/juce_mac_Video.h index 81aeb8a9ab..dbdd5433e1 100644 --- a/modules/juce_video/native/juce_mac_Video.h +++ b/modules/juce_video/native/juce_mac_Video.h @@ -76,7 +76,7 @@ struct VideoComponent::Pimpl : public Base return Result::fail ("Couldn't open movie"); } - void loadAsync (const URL& url, std::function callback) + void loadAsync (const URL& url, std::function callback) { if (url.isEmpty()) { @@ -770,7 +770,7 @@ private: PlayerController playerController; - std::function loadFinishedCallback; + std::function loadFinishedCallback; double playSpeedMult = 1.0; diff --git a/modules/juce_video/native/juce_win32_CameraDevice.h b/modules/juce_video/native/juce_win32_CameraDevice.h index 1a5185b95b..3abbc11a3e 100644 --- a/modules/juce_video/native/juce_win32_CameraDevice.h +++ b/modules/juce_video/native/juce_win32_CameraDevice.h @@ -177,7 +177,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster bool openedOk() const noexcept { return openedSuccessfully; } - void takeStillPicture (std::function pictureTakenCallbackToUse) + void takeStillPicture (std::function pictureTakenCallbackToUse) { { const ScopedLock sl (pictureTakenCallbackLock); @@ -551,7 +551,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster ListenerList listeners; CriticalSection pictureTakenCallbackLock; - std::function pictureTakenCallback; + std::function pictureTakenCallback; bool isRecording = false, openedSuccessfully = false; int width = 0, height = 0; diff --git a/modules/juce_video/playback/juce_VideoComponent.cpp b/modules/juce_video/playback/juce_VideoComponent.cpp index a2800c1f3a..8bca5c325f 100644 --- a/modules/juce_video/playback/juce_VideoComponent.cpp +++ b/modules/juce_video/playback/juce_VideoComponent.cpp @@ -51,7 +51,7 @@ Result VideoComponent::load (const URL& url) return loadInternal (url, false); } -void VideoComponent::loadAsync (const URL& url, std::function callback) +void VideoComponent::loadAsync (const URL& url, std::function callback) { if (callback == nullptr) { diff --git a/modules/juce_video/playback/juce_VideoComponent.h b/modules/juce_video/playback/juce_VideoComponent.h index 1c19b97033..297b0f3d27 100644 --- a/modules/juce_video/playback/juce_VideoComponent.h +++ b/modules/juce_video/playback/juce_VideoComponent.h @@ -85,7 +85,7 @@ public: @see load */ - void loadAsync (const URL& url, std::function loadFinishedCallback); + void loadAsync (const URL& url, std::function loadFinishedCallback); /** Closes the video and resets the component. */ void closeVideo(); @@ -161,7 +161,7 @@ public: /** Set this callback to be notified whenever an error occurs. Upon error, you may need to load the video again. */ - std::function onErrorOccurred; + std::function onErrorOccurred; private: //==============================================================================