diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp b/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp index c16bafeeaf..ecaf026f71 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp @@ -174,11 +174,11 @@ void AudioPluginFormat::createPluginInstanceAsync (const PluginDescription& desc void AudioPluginFormat::createPluginInstanceAsync (const PluginDescription& description, double initialSampleRate, int initialBufferSize, - std::function f) + std::function f) { struct CallbackInvoker : public AudioPluginFormat::InstantiationCompletionCallback { - CallbackInvoker (std::function inCompletion) + CallbackInvoker (std::function inCompletion) : completion (inCompletion) {} @@ -187,7 +187,7 @@ void AudioPluginFormat::createPluginInstanceAsync (const PluginDescription& desc completion (instance, error); } - std::function completion; + std::function completion; }; createPluginInstanceAsync (description, initialSampleRate, initialBufferSize, new CallbackInvoker (f)); diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormat.h b/modules/juce_audio_processors/format/juce_AudioPluginFormat.h index 3f00406163..17187166bc 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormat.h +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormat.h @@ -98,7 +98,7 @@ public: void createPluginInstanceAsync (const PluginDescription& description, double initialSampleRate, int initialBufferSize, - std::function completionCallback); + std::function completionCallback); /** Should do a quick check to see if this file or directory might be a plugin of this format. diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp b/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp index b996c5c6a5..b468a67a96 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp @@ -46,7 +46,7 @@ namespace PluginFormatManagerHelpers struct ErrorLambdaOnMessageThread : public CallbackMessage { ErrorLambdaOnMessageThread (const String& inError, - std::function f) + std::function f) : error (inError), lambda (f) { } @@ -54,7 +54,7 @@ namespace PluginFormatManagerHelpers void messageCallback() override { lambda (nullptr, error); } String error; - std::function lambda; + std::function lambda; }; } @@ -145,7 +145,7 @@ void AudioPluginFormatManager::createPluginInstanceAsync (const PluginDescriptio void AudioPluginFormatManager::createPluginInstanceAsync (const PluginDescription& description, double initialSampleRate, int initialBufferSize, - std::function f) + std::function f) { String error; diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.h b/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.h index 54b67b79d9..3d7ad5f52d 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.h +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.h @@ -119,7 +119,7 @@ public: void createPluginInstanceAsync (const PluginDescription& description, double initialSampleRate, int initialBufferSize, - std::function completionCallback); + std::function completionCallback); /** Checks that the file or component for this plugin actually still exists. diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 4c0366b468..4f56b60b2a 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -1367,8 +1367,8 @@ public: Unknown = -1 }; - std::function curve; // a function which represents your curve (such as an eq) - Range xRange, yRange; // the data range of your curve + 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. // An host can use to indicate where on the curve the current signal is (for example diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp b/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp index 08aaac0243..388e194c0f 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp @@ -29,8 +29,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 b20cf4f77e..cde56567a4 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterBool.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterBool.h @@ -52,8 +52,8 @@ public: */ AudioParameterBool (const String& parameterID, const String& name, bool defaultValue, const String& label = String(), - std::function stringFromBool = nullptr, - std::function boolFromString = nullptr); + std::function stringFromBool = nullptr, + std::function boolFromString = nullptr); /** Destructor. */ ~AudioParameterBool() override; @@ -90,8 +90,8 @@ private: const NormalisableRange range { 0.0f, 1.0f, 1.0f }; float 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 f21a4dbb4f..4968fa3134 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp @@ -29,8 +29,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 (0.0f, choices.size() - 1.0f, [](float, float end, float v) { return jlimit (0.0f, end, v * end); }, diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h index 7599658b60..43fcac5170 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h @@ -56,8 +56,8 @@ public: const StringArray& choices, int defaultItemIndex, const String& label = String(), - std::function stringFromIndex = nullptr, - std::function indexFromString = nullptr); + std::function stringFromIndex = nullptr, + std::function indexFromString = nullptr); /** Destructor. */ ~AudioParameterChoice() override; @@ -102,8 +102,8 @@ private: const NormalisableRange range; float 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 db34d18afb..f209ccc697 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp @@ -30,8 +30,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 9ae2e83389..b665d94440 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h @@ -59,8 +59,8 @@ public: float defaultValue, const String& label = String(), Category category = 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. @@ -108,8 +108,8 @@ private: float 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 c03c9efb18..1e9b3541ae 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp @@ -30,8 +30,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 ((float) minValue, (float) maxValue, [](float start, float end, float v) { return jlimit (start, end, v * (end - start) + start); }, diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h index 75ad4958dd..3d28d61879 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.h @@ -57,8 +57,8 @@ public: int minValue, int maxValue, int defaultValue, const String& label = String(), - std::function stringFromInt = nullptr, - std::function intFromString = nullptr); + std::function stringFromInt = nullptr, + std::function intFromString = nullptr); /** Destructor. */ ~AudioParameterInt() override; @@ -98,8 +98,8 @@ private: const NormalisableRange range; float 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 ebf01f3bf5..62c0466ad3 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp @@ -33,8 +33,8 @@ AudioProcessorValueTreeState::Parameter::Parameter (const String& parameterID, const String& labelText, NormalisableRange valueRange, float defaultValue, - std::function valueToTextFunction, - std::function textToValueFunction, + std::function valueToTextFunction, + std::function textToValueFunction, bool isMetaParameter, bool isAutomatableParameter, bool isDiscrete, @@ -46,7 +46,7 @@ AudioProcessorValueTreeState::Parameter::Parameter (const String& parameterID, defaultValue, labelText, category, - valueToTextFunction == nullptr ? std::function() + valueToTextFunction == nullptr ? std::function() : [valueToTextFunction](float v, int) { return valueToTextFunction (v); }, std::move (textToValueFunction)), unsnappedDefault (valueRange.convertTo0to1 (defaultValue)), @@ -252,8 +252,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 18ebd40412..ee137411b8 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h @@ -262,8 +262,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, @@ -516,7 +516,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_blocks_basics/blocks/juce_Block.h b/modules/juce_blocks_basics/blocks/juce_Block.h index 31448f4d41..9db8d42f66 100644 --- a/modules/juce_blocks_basics/blocks/juce_Block.h +++ b/modules/juce_blocks_basics/blocks/juce_Block.h @@ -440,7 +440,7 @@ public: /** 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; /** Provides a callback that will be called when a config changes. */ virtual void setConfigChangedCallback (std::function) = 0; diff --git a/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp b/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp index bb32758c18..230cb7eebe 100644 --- a/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp +++ b/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp @@ -384,7 +384,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 = {}; diff --git a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h index 47079d9f2e..390bf327c4 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 a25b9e220e..e4e2c69433 100644 --- a/modules/juce_core/containers/juce_Variant.h +++ b/modules/juce_core/containers/juce_Variant.h @@ -57,7 +57,7 @@ public: int numArguments; }; - using NativeFunction = std::function; + using NativeFunction = std::function; //============================================================================== /** Creates a void variant. */ diff --git a/modules/juce_core/maths/juce_NormalisableRange.h b/modules/juce_core/maths/juce_NormalisableRange.h index edda39a146..08472c8e58 100644 --- a/modules/juce_core/maths/juce_NormalisableRange.h +++ b/modules/juce_core/maths/juce_NormalisableRange.h @@ -125,9 +125,9 @@ public: */ NormalisableRange (ValueType rangeStart, ValueType rangeEnd, - std::function convertFrom0To1Func, - std::function convertTo0To1Func, - std::function snapToLegalValueFunc = nullptr) noexcept + std::function convertFrom0To1Func, + std::function convertTo0To1Func, + std::function snapToLegalValueFunc = nullptr) noexcept : start (rangeStart), end (rangeEnd), convertFrom0To1Function (convertFrom0To1Func), diff --git a/modules/juce_core/misc/juce_RuntimePermissions.h b/modules/juce_core/misc/juce_RuntimePermissions.h index 25d87fc6fd..7cd9794b7f 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 cda9a67379..ea41e53e22 100644 --- a/modules/juce_core/native/juce_android_JNIHelpers.cpp +++ b/modules/juce_core/native/juce_android_JNIHelpers.cpp @@ -606,7 +606,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)) {} @@ -628,11 +628,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 8b6a8d9dbc..4af5b85304 100644 --- a/modules/juce_core/native/juce_android_JNIHelpers.h +++ b/modules/juce_core/native/juce_android_JNIHelpers.h @@ -966,7 +966,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 21fe2563bb..817b18add0 100644 --- a/modules/juce_dsp/maths/juce_LookupTable.cpp +++ b/modules/juce_dsp/maths/juce_LookupTable.cpp @@ -36,7 +36,7 @@ LookupTable::LookupTable() } template -LookupTable::LookupTable (const std::function& functionToApproximate, +LookupTable::LookupTable (const std::function& functionToApproximate, size_t numPointsToUse) { initialise (functionToApproximate, numPointsToUse); @@ -44,7 +44,7 @@ LookupTable::LookupTable (const std::function& fu //============================================================================== template -void LookupTable::initialise (const std::function& functionToApproximate, +void LookupTable::initialise (const std::function& functionToApproximate, size_t numPointsToUse) { data.resize (static_cast (getRequiredBufferSize (numPointsToUse))); @@ -72,7 +72,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) @@ -98,7 +98,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 949c7f4ec0..88baf48854 100644 --- a/modules/juce_dsp/maths/juce_LookupTable.h +++ b/modules/juce_dsp/maths/juce_LookupTable.h @@ -68,7 +68,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. @@ -80,7 +80,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. @@ -196,7 +196,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) @@ -215,7 +215,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); @@ -309,7 +309,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/processors/juce_Oscillator.h b/modules/juce_dsp/processors/juce_Oscillator.h index a3a0d6e86b..41b65d5693 100644 --- a/modules/juce_dsp/processors/juce_Oscillator.h +++ b/modules/juce_dsp/processors/juce_Oscillator.h @@ -51,7 +51,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); @@ -61,7 +61,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) @@ -240,7 +240,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_gui_basics/filebrowser/juce_ContentSharer.cpp b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp index 6b948c82b3..6f54fb35ea 100644 --- a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp @@ -152,7 +152,7 @@ ContentSharer::ContentSharer() {} ContentSharer::~ContentSharer() { clearSingletonInstance(); } void ContentSharer::shareFiles (const Array& files, - std::function callbackToUse) + std::function callbackToUse) { #if JUCE_IOS || JUCE_ANDROID startNewShare (callbackToUse); @@ -169,7 +169,7 @@ void ContentSharer::shareFiles (const Array& files, } #if JUCE_IOS || JUCE_ANDROID -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! @@ -190,7 +190,7 @@ void ContentSharer::startNewShare (std::function cal #endif void ContentSharer::shareText (const String& text, - std::function callbackToUse) + std::function callbackToUse) { #if JUCE_IOS || JUCE_ANDROID startNewShare (callbackToUse); @@ -207,7 +207,7 @@ void ContentSharer::shareText (const String& text, } void ContentSharer::shareImages (const Array& images, - std::function callbackToUse, + std::function callbackToUse, ImageFileFormat* imageFileFormatToUse) { #if JUCE_IOS || JUCE_ANDROID @@ -240,7 +240,7 @@ void ContentSharer::filesToSharePrepared() #endif void ContentSharer::shareData (const MemoryBlock& mb, - std::function callbackToUse) + std::function callbackToUse) { #if JUCE_IOS || JUCE_ANDROID startNewShare (callbackToUse); @@ -257,7 +257,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 0578ca74f5..a486c2b3cb 100644 --- a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.h +++ b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.h @@ -53,7 +53,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. @@ -63,7 +63,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 @@ -87,7 +87,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 @@ -100,7 +100,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(); @@ -108,7 +108,7 @@ private: Array temporaryFiles; - std::function callback; + std::function callback; #if JUCE_IOS || JUCE_ANDROID struct Pimpl @@ -121,7 +121,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 913e2b7ad0..78b64841eb 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp @@ -169,7 +169,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 @@ -254,7 +254,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 099f0ef365..1398f33c34 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooser.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooser.h @@ -209,7 +209,7 @@ public: the lifetime of the file-chooser. */ void launchAsync (int flags, - std::function, + std::function, FilePreviewComponent* previewComponent = nullptr); //============================================================================== @@ -310,7 +310,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/widgets/juce_Slider.h b/modules/juce_gui_basics/widgets/juce_Slider.h index 655b5c1830..b4760c113e 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.h +++ b/modules/juce_gui_basics/widgets/juce_Slider.h @@ -606,10 +606,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_osc/osc/juce_OSCReceiver.h b/modules/juce_osc/osc/juce_OSCReceiver.h index a98359acb9..71648710b4 100644 --- a/modules/juce_osc/osc/juce_OSCReceiver.h +++ b/modules/juce_osc/osc/juce_OSCReceiver.h @@ -203,7 +203,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_video/capture/juce_CameraDevice.cpp b/modules/juce_video/capture/juce_CameraDevice.cpp index bd6243eb13..023a200d1e 100644 --- a/modules/juce_video/capture/juce_CameraDevice.cpp +++ b/modules/juce_video/capture/juce_CameraDevice.cpp @@ -159,7 +159,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 77e1931add..030a9330da 100644 --- a/modules/juce_video/capture/juce_CameraDevice.h +++ b/modules/juce_video/capture/juce_CameraDevice.h @@ -73,7 +73,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, @@ -127,7 +127,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. @@ -172,7 +172,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 d94202950f..783eb178e9 100644 --- a/modules/juce_video/native/juce_android_CameraDevice.h +++ b/modules/juce_video/native/juce_android_CameraDevice.h @@ -487,7 +487,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, @@ -563,7 +563,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) { @@ -2935,7 +2935,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 7b91f20615..b416d064e8 100644 --- a/modules/juce_video/native/juce_android_Video.h +++ b/modules/juce_video/native/juce_android_Video.h @@ -401,7 +401,7 @@ struct VideoComponent::Pimpl } } - void loadAsync (const URL& url, std::function callback) + void loadAsync (const URL& url, std::function callback) { close(); wasOpen = false; @@ -1750,7 +1750,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 3c513da33f..9147735117 100644 --- a/modules/juce_video/native/juce_ios_CameraDevice.h +++ b/modules/juce_video/native/juce_ios_CameraDevice.h @@ -26,7 +26,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*/, @@ -75,7 +75,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 25e11e2745..818f3e3caa 100644 --- a/modules/juce_video/native/juce_mac_CameraDevice.h +++ b/modules/juce_video/native/juce_mac_CameraDevice.h @@ -123,7 +123,7 @@ struct CameraDevice::Pimpl refreshConnections(); } - void takeStillPicture (std::function pictureTakenCallbackToUse) + void takeStillPicture (std::function pictureTakenCallbackToUse) { if (pictureTakenCallbackToUse == nullptr) { @@ -259,7 +259,7 @@ struct CameraDevice::Pimpl CriticalSection listenerLock; ListenerList listeners; - std::function pictureTakenCallback; + std::function pictureTakenCallback; 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 bd4cd4f9af..25572b5068 100644 --- a/modules/juce_video/native/juce_mac_Video.h +++ b/modules/juce_video/native/juce_mac_Video.h @@ -82,7 +82,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()) { @@ -774,7 +774,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 c41f94d3fc..28b0d47aa9 100644 --- a/modules/juce_video/native/juce_win32_CameraDevice.h +++ b/modules/juce_video/native/juce_win32_CameraDevice.h @@ -185,7 +185,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); @@ -559,7 +559,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 b6554d1cea..7c7833f6be 100644 --- a/modules/juce_video/playback/juce_VideoComponent.cpp +++ b/modules/juce_video/playback/juce_VideoComponent.cpp @@ -74,7 +74,7 @@ Result VideoComponent::load (const URL& url) #endif } -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 c8095ce709..8752b61d03 100644 --- a/modules/juce_video/playback/juce_VideoComponent.h +++ b/modules/juce_video/playback/juce_VideoComponent.h @@ -91,7 +91,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(); @@ -167,7 +167,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: //==============================================================================