Browse Source

Normalised all whitespace before args in std::function

tags/2021-05-28
ed 5 years ago
parent
commit
d510b73cdf
62 changed files with 149 additions and 149 deletions
  1. +1
    -1
      examples/DemoRunner/Source/UI/DemoContentComponent.cpp
  2. +2
    -2
      examples/DemoRunner/Source/UI/DemoContentComponent.h
  3. +4
    -4
      extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h
  4. +7
    -7
      extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.cpp
  5. +2
    -2
      extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.h
  6. +2
    -2
      extras/Projucer/Source/Application/StartPage/jucer_StartPageTreeHolder.h
  7. +2
    -2
      extras/Projucer/Source/Application/UserAccount/jucer_LicenseQueryThread.h
  8. +2
    -2
      modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
  9. +1
    -1
      modules/juce_audio_plugin_client/utility/juce_PluginHostType.h
  10. +1
    -1
      modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp
  11. +1
    -1
      modules/juce_audio_processors/format/juce_AudioPluginFormat.h
  12. +1
    -1
      modules/juce_audio_processors/processors/juce_AudioProcessor.h
  13. +2
    -2
      modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp
  14. +4
    -4
      modules/juce_audio_processors/utilities/juce_AudioParameterBool.h
  15. +2
    -2
      modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp
  16. +4
    -4
      modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h
  17. +2
    -2
      modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp
  18. +4
    -4
      modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h
  19. +2
    -2
      modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp
  20. +4
    -4
      modules/juce_audio_processors/utilities/juce_AudioParameterInt.h
  21. +5
    -5
      modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp
  22. +5
    -5
      modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h
  23. +2
    -2
      modules/juce_audio_processors/utilities/juce_ParameterAttachments.h
  24. +2
    -2
      modules/juce_blocks_basics/blocks/juce_Block.h
  25. +4
    -4
      modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp
  26. +1
    -1
      modules/juce_blocks_basics/topology/juce_BlockGraph.cpp
  27. +2
    -2
      modules/juce_blocks_basics/topology/juce_BlockGraph.h
  28. +1
    -1
      modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h
  29. +1
    -1
      modules/juce_core/containers/juce_Variant.h
  30. +1
    -1
      modules/juce_core/misc/juce_ConsoleApplication.h
  31. +1
    -1
      modules/juce_core/misc/juce_RuntimePermissions.h
  32. +3
    -3
      modules/juce_core/native/juce_android_JNIHelpers.cpp
  33. +1
    -1
      modules/juce_core/native/juce_android_JNIHelpers.h
  34. +4
    -4
      modules/juce_dsp/maths/juce_LookupTable.cpp
  35. +5
    -5
      modules/juce_dsp/maths/juce_LookupTable.h
  36. +3
    -3
      modules/juce_dsp/widgets/juce_Oscillator.h
  37. +1
    -1
      modules/juce_events/native/juce_linux_EventLoop.h
  38. +6
    -6
      modules/juce_events/native/juce_linux_Messaging.cpp
  39. +3
    -3
      modules/juce_gui_basics/components/juce_ModalComponentManager.cpp
  40. +1
    -1
      modules/juce_gui_basics/components/juce_ModalComponentManager.h
  41. +6
    -6
      modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp
  42. +6
    -6
      modules/juce_gui_basics/filebrowser/juce_ContentSharer.h
  43. +2
    -2
      modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp
  44. +2
    -2
      modules/juce_gui_basics/filebrowser/juce_FileChooser.h
  45. +1
    -1
      modules/juce_gui_basics/layout/juce_SidePanel.h
  46. +1
    -1
      modules/juce_gui_basics/menus/juce_PopupMenu.cpp
  47. +1
    -1
      modules/juce_gui_basics/menus/juce_PopupMenu.h
  48. +2
    -2
      modules/juce_gui_basics/widgets/juce_Slider.h
  49. +1
    -1
      modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp
  50. +1
    -1
      modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.h
  51. +1
    -1
      modules/juce_osc/osc/juce_OSCReceiver.h
  52. +2
    -2
      modules/juce_product_unlocking/native/juce_android_InAppPurchases.cpp
  53. +1
    -1
      modules/juce_video/capture/juce_CameraDevice.cpp
  54. +3
    -3
      modules/juce_video/capture/juce_CameraDevice.h
  55. +3
    -3
      modules/juce_video/native/juce_android_CameraDevice.h
  56. +2
    -2
      modules/juce_video/native/juce_android_Video.h
  57. +3
    -3
      modules/juce_video/native/juce_ios_CameraDevice.h
  58. +2
    -2
      modules/juce_video/native/juce_mac_CameraDevice.h
  59. +2
    -2
      modules/juce_video/native/juce_mac_Video.h
  60. +2
    -2
      modules/juce_video/native/juce_win32_CameraDevice.h
  61. +1
    -1
      modules/juce_video/playback/juce_VideoComponent.cpp
  62. +2
    -2
      modules/juce_video/playback/juce_VideoComponent.h

+ 1
- 1
examples/DemoRunner/Source/UI/DemoContentComponent.cpp View File

@@ -93,7 +93,7 @@ struct CodeContent : public Component
#endif
//==============================================================================
DemoContentComponent::DemoContentComponent (Component& mainComponent, std::function<void(bool)> callback)
DemoContentComponent::DemoContentComponent (Component& mainComponent, std::function<void (bool)> callback)
: TabbedComponent (TabbedButtonBar::Orientation::TabsAtTop),
demoChangedCallback (std::move (callback))
{


+ 2
- 2
examples/DemoRunner/Source/UI/DemoContentComponent.h View File

@@ -28,7 +28,7 @@ struct CodeContent;
class DemoContentComponent : public TabbedComponent
{
public:
DemoContentComponent (Component& mainComponent, std::function<void(bool)> demoChangedCallback);
DemoContentComponent (Component& mainComponent, std::function<void (bool)> demoChangedCallback);
~DemoContentComponent() override;
void resized() override;
@@ -43,7 +43,7 @@ public:
void setTabBarIndent (int indent) noexcept { tabBarIndent = indent; }
private:
std::function<void(bool)> demoChangedCallback;
std::function<void (bool)> demoChangedCallback;
std::unique_ptr<DemoContent> demoContent;


+ 4
- 4
extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h View File

@@ -85,7 +85,7 @@ class TemplateComponent : public Component
{
public:
TemplateComponent (const NewProjectTemplates::ProjectTemplate& temp,
std::function<void(std::unique_ptr<Project>)>&& createdCallback)
std::function<void (std::unique_ptr<Project>)>&& 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<void(std::unique_ptr<Project>)> projectCreatedCallback;
std::function<void (std::unique_ptr<Project>)> projectCreatedCallback;
ItemHeader header;
TextButton createProjectButton { "Create Project..." };
@@ -240,7 +240,7 @@ private:
class ExampleComponent : public Component
{
public:
ExampleComponent (const File& f, std::function<void(const File&)> selectedCallback)
ExampleComponent (const File& f, std::function<void (const File&)> selectedCallback)
: exampleFile (f),
metadata (parseJUCEHeaderMetadata (exampleFile)),
exampleSelectedCallback (std::move (selectedCallback)),
@@ -290,7 +290,7 @@ private:
File exampleFile;
var metadata;
std::function<void(const File&)> exampleSelectedCallback;
std::function<void (const File&)> exampleSelectedCallback;
ItemHeader header;


+ 7
- 7
extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.cpp View File

@@ -57,7 +57,7 @@ static File findExampleFile (int dirIndex, int index)
return ProjucerApplication::getSortedExampleFilesInDirectory (dir)[index];
}
static std::unique_ptr<Component> createExampleProjectsTab (ContentComponent& content, std::function<void(const File&)> cb)
static std::unique_ptr<Component> createExampleProjectsTab (ContentComponent& content, std::function<void (const File&)> cb)
{
StringArray exampleCategories;
std::vector<StringArray> examples;
@@ -120,7 +120,7 @@ static StringArray getAllTemplateNamesForCategory (const String& category)
}
static std::unique_ptr<Component> createProjectTemplatesTab (ContentComponent& content,
std::function<void(std::unique_ptr<Project>&&)>&& cb)
std::function<void (std::unique_ptr<Project>&&)>&& cb)
{
auto categories = getAllTemplateCategoryStrings();
@@ -150,8 +150,8 @@ static std::unique_ptr<Component> createProjectTemplatesTab (ContentComponent& c
struct ProjectTemplatesAndExamples : public TabbedComponent
{
ProjectTemplatesAndExamples (ContentComponent& c,
std::function<void(std::unique_ptr<Project>&&)>&& newProjectCb,
std::function<void(const File&)>&& exampleCb)
std::function<void (std::unique_ptr<Project>&&)>&& newProjectCb,
std::function<void (const File&)>&& exampleCb)
: TabbedComponent (TabbedButtonBar::Orientation::TabsAtTop),
content (c),
exampleSelectedCallback (std::move (exampleCb))
@@ -222,12 +222,12 @@ private:
};
ContentComponent& content;
std::function<void(const File&)> exampleSelectedCallback;
std::function<void (const File&)> exampleSelectedCallback;
};
//==============================================================================
StartPageComponent::StartPageComponent (std::function<void(std::unique_ptr<Project>&&)>&& newProjectCb,
std::function<void(const File&)>&& exampleCb)
StartPageComponent::StartPageComponent (std::function<void (std::unique_ptr<Project>&&)>&& newProjectCb,
std::function<void (const File&)>&& exampleCb)
: content (std::make_unique<ContentComponent>()),
tabs (std::make_unique<ProjectTemplatesAndExamples> (*content, std::move (newProjectCb), std::move (exampleCb)))
{


+ 2
- 2
extras/Projucer/Source/Application/StartPage/jucer_StartPageComponent.h View File

@@ -25,8 +25,8 @@ struct ProjectTemplatesAndExamples;
class StartPageComponent : public Component
{
public:
StartPageComponent (std::function<void(std::unique_ptr<Project>&&)>&& newProjectCb,
std::function<void(const File&)>&& exampleCb);
StartPageComponent (std::function<void (std::unique_ptr<Project>&&)>&& newProjectCb,
std::function<void (const File&)>&& exampleCb);
void paint (Graphics& g) override;
void resized() override;


+ 2
- 2
extras/Projucer/Source/Application/StartPage/jucer_StartPageTreeHolder.h View File

@@ -25,7 +25,7 @@ public:
enum class Open { no, yes };
StartPageTreeHolder (const StringArray& headerNames, const std::vector<StringArray>& itemNames,
std::function<void(int, int)>&& selectedCallback, Open shouldBeOpen)
std::function<void (int, int)>&& selectedCallback, Open shouldBeOpen)
: headers (headerNames),
items (itemNames),
itemSelectedCallback (std::move (selectedCallback))
@@ -160,7 +160,7 @@ private:
StringArray headers;
std::vector<StringArray> items;
std::function<void(int, int)> itemSelectedCallback;
std::function<void (int, int)> itemSelectedCallback;
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StartPageTreeHolder)


+ 2
- 2
extras/Projucer/Source/Application/UserAccount/jucer_LicenseQueryThread.h View File

@@ -24,7 +24,7 @@ class LicenseQueryThread : public Thread
{
public:
LicenseQueryThread (const String& userEmail, const String& userPassword,
std::function<void(LicenseState, String)>&& cb)
std::function<void (LicenseState, String)>&& cb)
: Thread ("LicenseQueryThread"),
email (userEmail),
password (userPassword),
@@ -266,7 +266,7 @@ private:
//==============================================================================
const String email, password;
const std::function<void(LicenseState, String)> completionCallback;
const std::function<void (LicenseState, String)> completionCallback;
//==============================================================================
JUCE_DECLARE_WEAK_REFERENCEABLE (LicenseQueryThread)


+ 2
- 2
modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp View File

@@ -62,7 +62,7 @@ namespace Vst2
#endif
#if JUCE_LINUX
std::vector<std::pair<int, std::function<void(int)>>> getFdReadCallbacks();
std::vector<std::pair<int, std::function<void (int)>>> getFdReadCallbacks();
#endif
namespace juce
@@ -1587,7 +1587,7 @@ private:
#if JUCE_WINDOWS
WindowsHooks hooks;
#elif JUCE_LINUX
std::unordered_map<int, std::function<void(int)>> fdCallbackMap;
std::unordered_map<int, std::function<void (int)>> fdCallbackMap;
::Display* display = XWindowSystem::getInstance()->getDisplay();


+ 1
- 1
modules/juce_audio_plugin_client/utility/juce_PluginHostType.h View File

@@ -293,7 +293,7 @@ public:
#ifndef DOXYGEN
// @internal
static AudioProcessor::WrapperType jucePlugInClientCurrentWrapperType;
static std::function<bool(AudioProcessor&)> jucePlugInIsRunningInAudioSuiteFn;
static std::function<bool (AudioProcessor&)> jucePlugInIsRunningInAudioSuiteFn;
#endif
private:


+ 1
- 1
modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp View File

@@ -28,7 +28,7 @@ namespace juce
{
AudioProcessor::WrapperType PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_Undefined;
std::function<bool(AudioProcessor&)> PluginHostType::jucePlugInIsRunningInAudioSuiteFn = nullptr;
std::function<bool (AudioProcessor&)> PluginHostType::jucePlugInIsRunningInAudioSuiteFn = nullptr;
#if JucePlugin_Build_Unity
bool juce_isRunningInUnity() { return PluginHostType::getPluginLoadedAs() == AudioProcessor::wrapperType_Unity; }


+ 1
- 1
modules/juce_audio_processors/format/juce_AudioPluginFormat.h View File

@@ -67,7 +67,7 @@ public:
String& errorMessage);
/** A callback lambda that is passed to createPluginInstanceAsync() */
using PluginCreationCallback = std::function<void(std::unique_ptr<AudioPluginInstance>, const String&)>;
using PluginCreationCallback = std::function<void (std::unique_ptr<AudioPluginInstance>, 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


+ 1
- 1
modules/juce_audio_processors/processors/juce_AudioProcessor.h View File

@@ -1167,7 +1167,7 @@ public:
Unknown = -1
};
std::function<float(float)> curve; // a function which represents your curve (such as an eq)
std::function<float (float)> curve; // a function which represents your curve (such as an eq)
Range<float> xRange, yRange; // the data range of your curve
// For some curve types, your plug-in may already measure the current input and output values.


+ 2
- 2
modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp View File

@@ -21,8 +21,8 @@ namespace juce
AudioParameterBool::AudioParameterBool (const String& idToUse, const String& nameToUse,
bool def, const String& labelToUse,
std::function<String(bool, int)> stringFromBool,
std::function<bool(const String&)> boolFromString)
std::function<String (bool, int)> stringFromBool,
std::function<bool (const String&)> boolFromString)
: RangedAudioParameter (idToUse, nameToUse, labelToUse),
value (def ? 1.0f : 0.0f),
defaultValue (value),


+ 4
- 4
modules/juce_audio_processors/utilities/juce_AudioParameterBool.h View File

@@ -44,8 +44,8 @@ public:
*/
AudioParameterBool (const String& parameterID, const String& parameterName, bool defaultValue,
const String& parameterLabel = String(),
std::function<String(bool value, int maximumStringLength)> stringFromBool = nullptr,
std::function<bool(const String& text)> boolFromString = nullptr);
std::function<String (bool value, int maximumStringLength)> stringFromBool = nullptr,
std::function<bool (const String& text)> boolFromString = nullptr);
/** Destructor. */
~AudioParameterBool() override;
@@ -82,8 +82,8 @@ private:
const NormalisableRange<float> range { 0.0f, 1.0f, 1.0f };
std::atomic<float> value;
const float defaultValue;
std::function<String(bool, int)> stringFromBoolFunction;
std::function<bool(const String&)> boolFromStringFunction;
std::function<String (bool, int)> stringFromBoolFunction;
std::function<bool (const String&)> boolFromStringFunction;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioParameterBool)
};


+ 2
- 2
modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp View File

@@ -21,8 +21,8 @@ namespace juce
AudioParameterChoice::AudioParameterChoice (const String& idToUse, const String& nameToUse,
const StringArray& c, int def, const String& labelToUse,
std::function<String(int, int)> stringFromIndex,
std::function<int(const String&)> indexFromString)
std::function<String (int, int)> stringFromIndex,
std::function<int (const String&)> indexFromString)
: RangedAudioParameter (idToUse, nameToUse, labelToUse), choices (c),
range ([this]
{


+ 4
- 4
modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h View File

@@ -48,8 +48,8 @@ public:
const StringArray& choices,
int defaultItemIndex,
const String& parameterLabel = String(),
std::function<String(int index, int maximumStringLength)> stringFromIndex = nullptr,
std::function<int(const String& text)> indexFromString = nullptr);
std::function<String (int index, int maximumStringLength)> stringFromIndex = nullptr,
std::function<int (const String& text)> indexFromString = nullptr);
/** Destructor. */
~AudioParameterChoice() override;
@@ -94,8 +94,8 @@ private:
const NormalisableRange<float> range;
std::atomic<float> value;
const float defaultValue;
std::function<String(int, int)> stringFromIndexFunction;
std::function<int(const String&)> indexFromStringFunction;
std::function<String (int, int)> stringFromIndexFunction;
std::function<int (const String&)> indexFromStringFunction;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioParameterChoice)
};


+ 2
- 2
modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp View File

@@ -22,8 +22,8 @@ namespace juce
AudioParameterFloat::AudioParameterFloat (const String& idToUse, const String& nameToUse,
NormalisableRange<float> r, float def,
const String& labelToUse, Category categoryToUse,
std::function<String(float, int)> stringFromValue,
std::function<float(const String&)> valueFromString)
std::function<String (float, int)> stringFromValue,
std::function<float (const String&)> valueFromString)
: RangedAudioParameter (idToUse, nameToUse, labelToUse, categoryToUse),
range (r), value (def), defaultValue (def),
stringFromValueFunction (stringFromValue),


+ 4
- 4
modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h View File

@@ -51,8 +51,8 @@ public:
float defaultValue,
const String& parameterLabel = String(),
Category parameterCategory = AudioProcessorParameter::genericParameter,
std::function<String(float value, int maximumStringLength)> stringFromValue = nullptr,
std::function<float(const String& text)> valueFromString = nullptr);
std::function<String (float value, int maximumStringLength)> stringFromValue = nullptr,
std::function<float (const String& text)> 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<float> value;
const float defaultValue;
std::function<String(float, int)> stringFromValueFunction;
std::function<float(const String&)> valueFromStringFunction;
std::function<String (float, int)> stringFromValueFunction;
std::function<float (const String&)> valueFromStringFunction;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioParameterFloat)
};


+ 2
- 2
modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp View File

@@ -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<String(int, int)> stringFromInt,
std::function<int(const String&)> intFromString)
std::function<String (int, int)> stringFromInt,
std::function<int (const String&)> intFromString)
: RangedAudioParameter (idToUse, nameToUse, labelToUse),
range ([minValue, maxValue]
{


+ 4
- 4
modules/juce_audio_processors/utilities/juce_AudioParameterInt.h View File

@@ -49,8 +49,8 @@ public:
int minValue, int maxValue,
int defaultValue,
const String& parameterLabel = String(),
std::function<String(int value, int maximumStringLength)> stringFromInt = nullptr,
std::function<int(const String& text)> intFromString = nullptr);
std::function<String (int value, int maximumStringLength)> stringFromInt = nullptr,
std::function<int (const String& text)> intFromString = nullptr);
/** Destructor. */
~AudioParameterInt() override;
@@ -90,8 +90,8 @@ private:
const NormalisableRange<float> range;
std::atomic<float> value;
const float defaultValue;
std::function<String(int, int)> stringFromIntFunction;
std::function<int(const String&)> intFromStringFunction;
std::function<String (int, int)> stringFromIntFunction;
std::function<int (const String&)> intFromStringFunction;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioParameterInt)
};


+ 5
- 5
modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp View File

@@ -25,8 +25,8 @@ AudioProcessorValueTreeState::Parameter::Parameter (const String& parameterID,
const String& labelText,
NormalisableRange<float> valueRange,
float defaultParameterValue,
std::function<String(float)> valueToTextFunction,
std::function<float(const String&)> textToValueFunction,
std::function<String (float)> valueToTextFunction,
std::function<float (const String&)> textToValueFunction,
bool isMetaParameter,
bool isAutomatableParameter,
bool isDiscrete,
@@ -38,7 +38,7 @@ AudioProcessorValueTreeState::Parameter::Parameter (const String& parameterID,
defaultParameterValue,
labelText,
parameterCategory,
valueToTextFunction == nullptr ? std::function<String(float v, int)>()
valueToTextFunction == nullptr ? std::function<String (float v, int)>()
: [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<float> range,
float defaultVal,
std::function<String(float)> valueToTextFunction,
std::function<float(const String&)> textToValueFunction,
std::function<String (float)> valueToTextFunction,
std::function<float (const String&)> textToValueFunction,
bool isMetaParameter,
bool isAutomatableParameter,
bool isDiscreteParameter,


+ 5
- 5
modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h View File

@@ -254,8 +254,8 @@ public:
const String& labelText,
NormalisableRange<float> valueRange,
float defaultValue,
std::function<String(float)> valueToTextFunction,
std::function<float(const String&)> textToValueFunction,
std::function<String (float)> valueToTextFunction,
std::function<float (const String&)> textToValueFunction,
bool isMetaParameter = false,
bool isAutomatableParameter = true,
bool isDiscrete = false,
@@ -394,8 +394,8 @@ public:
const String& labelText,
NormalisableRange<float> valueRange,
float defaultValue,
std::function<String(float)> valueToTextFunction,
std::function<float(const String&)> textToValueFunction,
std::function<String (float)> valueToTextFunction,
std::function<float (const String&)> textToValueFunction,
bool isMetaParameter = false,
bool isAutomatableParameter = true,
bool isDiscrete = false,
@@ -514,7 +514,7 @@ private:
@endcode
*/
JUCE_DEPRECATED (std::unique_ptr<RangedAudioParameter> createParameter (const String&, const String&, const String&, NormalisableRange<float>,
float, std::function<String(float)>, std::function<float(const String&)>,
float, std::function<String (float)>, std::function<float (const String&)>,
bool, bool, bool, AudioProcessorParameter::Category, bool));
//==============================================================================


+ 2
- 2
modules/juce_audio_processors/utilities/juce_ParameterAttachments.h View File

@@ -49,7 +49,7 @@ public:
requests a parameter change.
*/
ParameterAttachment (RangedAudioParameter& parameter,
std::function<void(float)> parameterChangedCallback,
std::function<void (float)> parameterChangedCallback,
UndoManager* undoManager = nullptr);
/** Destructor. */
@@ -105,7 +105,7 @@ private:
RangedAudioParameter& parameter;
std::atomic<float> lastValue { 0.0f };
UndoManager* undoManager = nullptr;
std::function<void(float)> setValue;
std::function<void (float)> setValue;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ParameterAttachment)
};


+ 2
- 2
modules/juce_blocks_basics/blocks/juce_Block.h View File

@@ -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<void(const Block& block, const String&)> loggingCallback) = 0;
virtual void setLogger (std::function<void (const Block& block, const String&)> 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<void(uint8, uint32)> packetAckCallback) = 0;
std::function<void (uint8, uint32)> packetAckCallback) = 0;
//==============================================================================
/** Interface for objects listening to input data port. */


+ 4
- 4
modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp View File

@@ -261,9 +261,9 @@ public:
}
//==============================================================================
std::function<void(const Block& block, const String&)> logger;
std::function<void (const Block& block, const String&)> logger;
void setLogger (std::function<void(const Block& block, const String&)> newLogger) override
void setLogger (std::function<void (const Block& block, const String&)> newLogger) override
{
logger = std::move (newLogger);
}
@@ -447,7 +447,7 @@ public:
remoteHeap.handleACKFromDevice (*this, packetCounter);
}
bool sendFirmwareUpdatePacket (const uint8* data, uint8 size, std::function<void(uint8, uint32)> callback) override
bool sendFirmwareUpdatePacket (const uint8* data, uint8 size, std::function<void (uint8, uint32)> callback) override
{
firmwarePacketAckCallback = nullptr;
@@ -694,7 +694,7 @@ private:
std::unique_ptr<Program> program;
uint32 programSize = 0;
std::function<void(uint8, uint32)> firmwarePacketAckCallback;
std::function<void (uint8, uint32)> firmwarePacketAckCallback;
bool isMaster = false;
Block::UID masterUID = {};


+ 1
- 1
modules/juce_blocks_basics/topology/juce_BlockGraph.cpp View File

@@ -23,7 +23,7 @@
namespace juce
{
BlockGraph::BlockGraph (const BlockTopology t, std::function<bool(Block::Ptr)> filterIn)
BlockGraph::BlockGraph (const BlockTopology t, std::function<bool (Block::Ptr)> filterIn)
: topology (t), filter (std::move (filterIn))
{
buildGraph();


+ 2
- 2
modules/juce_blocks_basics/topology/juce_BlockGraph.h View File

@@ -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<bool(Block::Ptr block)> filter = nullptr);
BlockGraph (const BlockTopology topology, std::function<bool (Block::Ptr block)> filter = nullptr);
BlockGraph (BlockGraph&&);
using BlockTraversalPaths = Array<Block::Array, CriticalSection>;
@@ -58,7 +58,7 @@ private:
BlockTraversalPaths traversalPaths; // one path for each master block
BlockTopology topology;
std::function<bool(Block::Ptr)> filter;
std::function<bool (Block::Ptr)> filter;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BlockGraph)
};


+ 1
- 1
modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h View File

@@ -62,7 +62,7 @@ public:
virtual ~DeviceConnection();
virtual bool sendMessageToDevice (const void* data, size_t dataSize) = 0;
std::function<void(const void* data, size_t dataSize)> handleMessageFromDevice;
std::function<void (const void* data, size_t dataSize)> handleMessageFromDevice;
};
/** For custom transport systems, this represents a connected device */


+ 1
- 1
modules/juce_core/containers/juce_Variant.h View File

@@ -54,7 +54,7 @@ public:
int numArguments;
};
using NativeFunction = std::function<var(const NativeFunctionArgs&)>;
using NativeFunction = std::function<var (const NativeFunctionArgs&)>;
//==============================================================================
/** Creates a void variant. */


+ 1
- 1
modules/juce_core/misc/juce_ConsoleApplication.h View File

@@ -264,7 +264,7 @@ struct ConsoleApplication
String longDescription;
/** The actual command that should be invoked to perform this action. */
std::function<void(const ArgumentList&)> command;
std::function<void (const ArgumentList&)> command;
};
//==============================================================================


+ 1
- 1
modules/juce_core/misc/juce_RuntimePermissions.h View File

@@ -91,7 +91,7 @@ public:
//==============================================================================
/** Function type of runtime permission request callbacks. */
using Callback = std::function<void(bool)>;
using Callback = std::function<void (bool)>;
//==============================================================================
/** Call this method to request a runtime permission.


+ 3
- 3
modules/juce_core/native/juce_android_JNIHelpers.cpp View File

@@ -620,7 +620,7 @@ class ActivityLauncher : public FragmentOverlay
public:
ActivityLauncher (const LocalRef<jobject>& intentToUse,
int requestCodeToUse,
std::function<void(int, int, LocalRef<jobject>)> && callbackToUse)
std::function<void (int, int, LocalRef<jobject>)> && callbackToUse)
: intent (intentToUse), requestCode (requestCodeToUse), callback (std::move (callbackToUse))
{}
@@ -642,11 +642,11 @@ public:
private:
GlobalRef intent;
int requestCode;
std::function<void(int, int, LocalRef<jobject>)> callback;
std::function<void (int, int, LocalRef<jobject>)> callback;
};
void startAndroidActivityForResult (const LocalRef<jobject>& intent, int requestCode,
std::function<void(int, int, LocalRef<jobject>)> && callback)
std::function<void (int, int, LocalRef<jobject>)> && callback)
{
auto* activityLauncher = new ActivityLauncher (intent, requestCode, std::move (callback));
activityLauncher->open();


+ 1
- 1
modules/juce_core/native/juce_android_JNIHelpers.h View File

@@ -983,7 +983,7 @@ public:
//==============================================================================
// Allows you to start an activity without requiring to have an activity
void startAndroidActivityForResult (const LocalRef<jobject>& intent, int requestCode,
std::function<void(int, int, LocalRef<jobject>)> && callback);
std::function<void (int, int, LocalRef<jobject>)> && callback);
//==============================================================================
bool androidHasSystemFeature (const String& property);


+ 4
- 4
modules/juce_dsp/maths/juce_LookupTable.cpp View File

@@ -28,7 +28,7 @@ LookupTable<FloatType>::LookupTable()
}
template <typename FloatType>
LookupTable<FloatType>::LookupTable (const std::function<FloatType(size_t)>& functionToApproximate,
LookupTable<FloatType>::LookupTable (const std::function<FloatType (size_t)>& functionToApproximate,
size_t numPointsToUse)
{
initialise (functionToApproximate, numPointsToUse);
@@ -36,7 +36,7 @@ LookupTable<FloatType>::LookupTable (const std::function<FloatType(size_t)>& fun
//==============================================================================
template <typename FloatType>
void LookupTable<FloatType>::initialise (const std::function<FloatType(size_t)>& functionToApproximate,
void LookupTable<FloatType>::initialise (const std::function<FloatType (size_t)>& functionToApproximate,
size_t numPointsToUse)
{
data.resize (static_cast<int> (getRequiredBufferSize (numPointsToUse)));
@@ -64,7 +64,7 @@ void LookupTable<FloatType>::prepare() noexcept
}
template <typename FloatType>
void LookupTableTransform<FloatType>::initialise (const std::function<FloatType(FloatType)>& functionToApproximate,
void LookupTableTransform<FloatType>::initialise (const std::function<FloatType (FloatType)>& functionToApproximate,
FloatType minInputValueToUse,
FloatType maxInputValueToUse,
size_t numPoints)
@@ -90,7 +90,7 @@ void LookupTableTransform<FloatType>::initialise (const std::function<FloatType(
//==============================================================================
template <typename FloatType>
double LookupTableTransform<FloatType>::calculateMaxRelativeError (const std::function<FloatType(FloatType)>& functionToApproximate,
double LookupTableTransform<FloatType>::calculateMaxRelativeError (const std::function<FloatType (FloatType)>& functionToApproximate,
FloatType minInputValue,
FloatType maxInputValue,
size_t numPoints,


+ 5
- 5
modules/juce_dsp/maths/juce_LookupTable.h View File

@@ -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<FloatType(size_t)>& functionToApproximate, size_t numPointsToUse);
LookupTable (const std::function<FloatType (size_t)>& 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<FloatType(size_t)>& functionToApproximate, size_t numPointsToUse);
void initialise (const std::function<FloatType (size_t)>& 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<FloatType(FloatType)>& functionToApproximate,
LookupTableTransform (const std::function<FloatType (FloatType)>& 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<FloatType(FloatType)>& functionToApproximate,
void initialise (const std::function<FloatType (FloatType)>& 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<FloatType(FloatType)>& functionToApproximate,
static double calculateMaxRelativeError (const std::function<FloatType (FloatType)>& functionToApproximate,
FloatType minInputValue,
FloatType maxInputValue,
size_t numPoints,


+ 3
- 3
modules/juce_dsp/widgets/juce_Oscillator.h View File

@@ -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<NumericType(NumericType)>& function,
Oscillator (const std::function<NumericType (NumericType)>& function,
size_t lookupTableNumPoints = 0)
{
initialise (function, lookupTableNumPoints);
@@ -53,7 +53,7 @@ public:
bool isInitialised() const noexcept { return static_cast<bool> (generator); }
/** Initialises the oscillator with a waveform. */
void initialise (const std::function<NumericType(NumericType)>& function,
void initialise (const std::function<NumericType (NumericType)>& function,
size_t lookupTableNumPoints = 0)
{
if (lookupTableNumPoints != 0)
@@ -232,7 +232,7 @@ public:
private:
//==============================================================================
std::function<NumericType(NumericType)> generator;
std::function<NumericType (NumericType)> generator;
std::unique_ptr<LookupTableTransform<NumericType>> lookupTable;
Array<NumericType> rampBuffer;
SmoothedValue<NumericType> frequency { static_cast<NumericType> (440.0) };


+ 1
- 1
modules/juce_events/native/juce_linux_EventLoop.h View File

@@ -38,7 +38,7 @@ namespace LinuxEventLoop
file descriptor. The possible values for this are defined in
<poll.h>
*/
void registerFdCallback (int fd, std::function<void(int)> readCallback, short eventMask = 1 /*POLLIN*/);
void registerFdCallback (int fd, std::function<void (int)> readCallback, short eventMask = 1 /*POLLIN*/);
/** Unregisters a previously registered file descriptor.


+ 6
- 6
modules/juce_events/native/juce_linux_Messaging.cpp View File

@@ -117,7 +117,7 @@ public:
fdReadCallbacks.reserve (16);
}
void registerFdCallback (int fd, std::function<void(int)>&& cb, short eventMask)
void registerFdCallback (int fd, std::function<void (int)>&& cb, short eventMask)
{
const ScopedLock sl (lock);
@@ -145,7 +145,7 @@ public:
}
{
auto removePredicate = [=] (const std::pair<int, std::function<void(int)>>& cb) { return cb.first == fd; };
auto removePredicate = [=] (const std::pair<int, std::function<void (int)>>& 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<nfds_t> (pfds.size()), timeoutMs);
}
std::vector<std::pair<int, std::function<void(int)>>> getFdReadCallbacks()
std::vector<std::pair<int, std::function<void (int)>>> getFdReadCallbacks()
{
const ScopedLock sl (lock);
return fdReadCallbacks;
@@ -223,7 +223,7 @@ public:
private:
CriticalSection lock;
std::vector<std::pair<int, std::function<void(int)>>> fdReadCallbacks;
std::vector<std::pair<int, std::function<void (int)>>> fdReadCallbacks;
std::vector<pollfd> pfds;
bool shouldDeferModifyingReadCallbacks = false;
@@ -311,7 +311,7 @@ bool MessageManager::dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMes
}
//==============================================================================
void LinuxEventLoop::registerFdCallback (int fd, std::function<void(int)> readCallback, short eventMask)
void LinuxEventLoop::registerFdCallback (int fd, std::function<void (int)> 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<std::pair<int, std::function<void(int)>>> getFdReadCallbacks()
JUCE_API std::vector<std::pair<int, std::function<void (int)>>> getFdReadCallbacks()
{
using namespace juce;


+ 3
- 3
modules/juce_gui_basics/components/juce_ModalComponentManager.cpp View File

@@ -279,7 +279,7 @@ int ModalComponentManager::runEventLoopForCurrentComponent()
//==============================================================================
struct LambdaCallback : public ModalComponentManager::Callback
{
LambdaCallback (std::function<void(int)> fn) noexcept : function (fn) {}
LambdaCallback (std::function<void (int)> fn) noexcept : function (fn) {}
void modalStateFinished (int result) override
{
@@ -287,12 +287,12 @@ struct LambdaCallback : public ModalComponentManager::Callback
function (result);
}
std::function<void(int)> function;
std::function<void (int)> function;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LambdaCallback)
};
ModalComponentManager::Callback* ModalCallbackFunction::create (std::function<void(int)> f)
ModalComponentManager::Callback* ModalCallbackFunction::create (std::function<void (int)> f)
{
return new LambdaCallback (f);
}


+ 1
- 1
modules/juce_gui_basics/components/juce_ModalComponentManager.h View File

@@ -162,7 +162,7 @@ public:
@see ModalComponentManager::Callback
*/
static ModalComponentManager::Callback* create (std::function<void(int)>);
static ModalComponentManager::Callback* create (std::function<void (int)>);
//==============================================================================
/** This is a utility function to create a ModalComponentManager::Callback that will


+ 6
- 6
modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp View File

@@ -144,7 +144,7 @@ ContentSharer::ContentSharer() {}
ContentSharer::~ContentSharer() { clearSingletonInstance(); }
void ContentSharer::shareFiles (const Array<URL>& files,
std::function<void(bool, const String&)> callbackToUse)
std::function<void (bool, const String&)> callbackToUse)
{
#if JUCE_CONTENT_SHARING
startNewShare (callbackToUse);
@@ -161,7 +161,7 @@ void ContentSharer::shareFiles (const Array<URL>& files,
}
#if JUCE_CONTENT_SHARING
void ContentSharer::startNewShare (std::function<void(bool, const String&)> callbackToUse)
void ContentSharer::startNewShare (std::function<void (bool, const String&)> 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<void(bool, const String&)> call
#endif
void ContentSharer::shareText (const String& text,
std::function<void(bool, const String&)> callbackToUse)
std::function<void (bool, const String&)> callbackToUse)
{
#if JUCE_CONTENT_SHARING
startNewShare (callbackToUse);
@@ -199,7 +199,7 @@ void ContentSharer::shareText (const String& text,
}
void ContentSharer::shareImages (const Array<Image>& images,
std::function<void(bool, const String&)> callbackToUse,
std::function<void (bool, const String&)> callbackToUse,
ImageFileFormat* imageFileFormatToUse)
{
#if JUCE_CONTENT_SHARING
@@ -232,7 +232,7 @@ void ContentSharer::filesToSharePrepared()
#endif
void ContentSharer::shareData (const MemoryBlock& mb,
std::function<void(bool, const String&)> callbackToUse)
std::function<void (bool, const String&)> callbackToUse)
{
#if JUCE_CONTENT_SHARING
startNewShare (callbackToUse);
@@ -249,7 +249,7 @@ void ContentSharer::sharingFinished (bool succeeded, const String& errorDescript
{
deleteTemporaryFiles();
std::function<void(bool, String)> cb;
std::function<void (bool, String)> cb;
std::swap (cb, callback);
String error (errorDescription);


+ 6
- 6
modules/juce_gui_basics/filebrowser/juce_ContentSharer.h View File

@@ -45,7 +45,7 @@ public:
succeeded. Also, the optional error message is always empty on Android.
*/
void shareFiles (const Array<URL>& files,
std::function<void(bool /*success*/, const String& /*error*/)> callback);
std::function<void (bool /*success*/, const String& /*error*/)> 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<void(bool /*success*/, const String& /*error*/)> callback);
std::function<void (bool /*success*/, const String& /*error*/)> 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<Image>& images,
std::function<void(bool /*success*/, const String& /*error*/)> callback,
std::function<void (bool /*success*/, const String& /*error*/)> 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<void(bool /*success*/, const String& /*error*/)> callback);
std::function<void (bool /*success*/, const String& /*error*/)> callback);
private:
ContentSharer();
@@ -100,7 +100,7 @@ private:
Array<File> temporaryFiles;
std::function<void(bool, String)> callback;
std::function<void (bool, String)> callback;
#if JUCE_CONTENT_SHARING
struct Pimpl
@@ -113,7 +113,7 @@ private:
std::unique_ptr<Pimpl> pimpl;
Pimpl* createPimpl();
void startNewShare (std::function<void(bool, const String&)>);
void startNewShare (std::function<void (bool, const String&)>);
class ContentSharerNativeImpl;
friend class ContentSharerNativeImpl;


+ 2
- 2
modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp View File

@@ -161,7 +161,7 @@ bool FileChooser::showDialog (const int flags, FilePreviewComponent* const previ
}
#endif
void FileChooser::launchAsync (int flags, std::function<void(const FileChooser&)> callback,
void FileChooser::launchAsync (int flags, std::function<void (const FileChooser&)> callback,
FilePreviewComponent* previewComp)
{
// You must specify a callback when using launchAsync
@@ -246,7 +246,7 @@ URL FileChooser::getURLResult() const
void FileChooser::finished (const Array<URL>& asyncResults)
{
std::function<void(const FileChooser&)> callback;
std::function<void (const FileChooser&)> callback;
std::swap (callback, asyncCallback);
results = asyncResults;


+ 2
- 2
modules/juce_gui_basics/filebrowser/juce_FileChooser.h View File

@@ -201,7 +201,7 @@ public:
the lifetime of the file-chooser.
*/
void launchAsync (int flags,
std::function<void(const FileChooser&)>,
std::function<void (const FileChooser&)>,
FilePreviewComponent* previewComponent = nullptr);
//==============================================================================
@@ -302,7 +302,7 @@ private:
Array<URL> results;
const bool useNativeDialogBox;
const bool treatFilePackagesAsDirs;
std::function<void(const FileChooser&)> asyncCallback;
std::function<void (const FileChooser&)> asyncCallback;
//==============================================================================
void finished (const Array<URL>&);


+ 1
- 1
modules/juce_gui_basics/layout/juce_SidePanel.h View File

@@ -182,7 +182,7 @@ public:
std::function<void()> onPanelMove;
/** You can assign a lambda to this callback object and it will be called when the panel is shown or hidden. */
std::function<void(bool)> onPanelShowHide;
std::function<void (bool)> onPanelShowHide;
private:
//==============================================================================


+ 1
- 1
modules/juce_gui_basics/menus/juce_PopupMenu.cpp View File

@@ -1789,7 +1789,7 @@ void PopupMenu::showMenuAsync (const Options& options, ModalComponentManager::Ca
showWithOptionalCallback (options, userCallback, false);
}
void PopupMenu::showMenuAsync (const Options& options, std::function<void(int)> userCallback)
void PopupMenu::showMenuAsync (const Options& options, std::function<void (int)> userCallback)
{
showWithOptionalCallback (options, ModalCallbackFunction::create (userCallback), false);
}


+ 1
- 1
modules/juce_gui_basics/menus/juce_PopupMenu.h View File

@@ -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<void(int)> callback);
std::function<void (int)> callback);
//==============================================================================
/** Closes any menus that are currently open.


+ 2
- 2
modules/juce_gui_basics/widgets/juce_Slider.h View File

@@ -598,10 +598,10 @@ public:
std::function<void()> onDragEnd;
/** You can assign a lambda that will be used to convert textual values to the slider's normalised position. */
std::function<double(const String&)> valueFromTextFunction;
std::function<double (const String&)> valueFromTextFunction;
/** You can assign a lambda that will be used to convert the slider's normalised position to a textual value. */
std::function<String(double)> textFromValueFunction;
std::function<String (double)> textFromValueFunction;
//==============================================================================
/** This lets you choose whether double-clicking or single-clicking with a specified


+ 1
- 1
modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp View File

@@ -428,7 +428,7 @@ struct ShaderPrograms : public ReferenceCountedObject
OpenGLShaderProgram::Attribute positionAttribute, colourAttribute;
OpenGLShaderProgram::Uniform screenBounds;
std::function<void(OpenGLShaderProgram&)> onShaderActivated;
std::function<void (OpenGLShaderProgram&)> onShaderActivated;
};
struct MaskedShaderParams


+ 1
- 1
modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.h View File

@@ -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<void(OpenGLShaderProgram&)> onShaderActivated;
std::function<void (OpenGLShaderProgram&)> onShaderActivated;
private:
String code, hashName;


+ 1
- 1
modules/juce_osc/osc/juce_OSCReceiver.h View File

@@ -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<void(const char* data, int dataSize)>;
using FormatErrorHandler = std::function<void (const char* data, int dataSize)>;
/** 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.


+ 2
- 2
modules/juce_product_unlocking/native/juce_android_InAppPurchases.cpp View File

@@ -501,8 +501,8 @@ private:
InAppPurchases& owner;
GlobalRef billingClient;
std::queue<std::function<void(LocalRef<jobject>)>> skuDetailsQueryCallbackQueue,
purchasesListQueryCallbackQueue;
std::queue<std::function<void (LocalRef<jobject>)>> skuDetailsQueryCallbackQueue,
purchasesListQueryCallbackQueue;
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl)


+ 1
- 1
modules/juce_video/capture/juce_CameraDevice.cpp View File

@@ -146,7 +146,7 @@ Component* CameraDevice::createViewerComponent()
return new ViewerComponent (*this);
}
void CameraDevice::takeStillPicture (std::function<void(const Image&)> pictureTakenCallback)
void CameraDevice::takeStillPicture (std::function<void (const Image&)> pictureTakenCallback)
{
pimpl->takeStillPicture (pictureTakenCallback);
}


+ 3
- 3
modules/juce_video/capture/juce_CameraDevice.h View File

@@ -65,7 +65,7 @@ public:
int maxWidth = 1024, int maxHeight = 768,
bool highQuality = true);
using OpenCameraResultCallback = std::function<void(CameraDevice*, const String& /*error*/)>;
using OpenCameraResultCallback = std::function<void (CameraDevice*, const String& /*error*/)>;
/** 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<void(const Image&)> pictureTakenCallback);
void takeStillPicture (std::function<void (const Image&)> 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<void(const String& /*error*/)> onErrorOccurred;
std::function<void (const String& /*error*/)> onErrorOccurred;
//==============================================================================
/**


+ 3
- 3
modules/juce_video/native/juce_android_CameraDevice.h View File

@@ -477,7 +477,7 @@ private:
struct CameraDevice::Pimpl
: private ActivityLifecycleCallbacks
{
using InternalOpenCameraResultCallback = std::function<void(const String& /*cameraId*/, const String& /*error*/)>;
using InternalOpenCameraResultCallback = std::function<void (const String& /*cameraId*/, const String& /*error*/)>;
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<void(const Image&)> pictureTakenCallbackToUse)
void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)
{
if (pictureTakenCallbackToUse == nullptr || currentCaptureSessionMode == nullptr)
{
@@ -2926,7 +2926,7 @@ private:
CriticalSection listenerLock;
ListenerList<Listener> listeners;
std::function<void(const Image&)> pictureTakenCallback;
std::function<void (const Image&)> pictureTakenCallback;
Time firstRecordedFrameTimeMs;
bool notifiedOfCameraOpening = false;


+ 2
- 2
modules/juce_video/native/juce_android_Video.h View File

@@ -393,7 +393,7 @@ struct VideoComponent::Pimpl
}
}
void loadAsync (const URL& url, std::function<void(const URL&, Result)> callback)
void loadAsync (const URL& url, std::function<void (const URL&, Result)> callback)
{
close();
wasOpen = false;
@@ -1742,7 +1742,7 @@ private:
#endif
GlobalRef surfaceHolderCallback;
std::function<void(const URL&, Result)> loadFinishedCallback;
std::function<void (const URL&, Result)> loadFinishedCallback;
bool wasOpen = false;


+ 3
- 3
modules/juce_video/native/juce_ios_CameraDevice.h View File

@@ -23,7 +23,7 @@
struct CameraDevice::Pimpl
{
using InternalOpenCameraResultCallback = std::function<void(const String& /*cameraId*/, const String& /*error*/)>;
using InternalOpenCameraResultCallback = std::function<void (const String& /*cameraId*/, const String& /*error*/)>;
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<void(const Image&)> pictureTakenCallbackToUse)
void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)
{
if (pictureTakenCallbackToUse == nullptr)
{
@@ -1214,7 +1214,7 @@ private:
CriticalSection listenerLock;
ListenerList<Listener> listeners;
std::function<void(const Image&)> pictureTakenCallback;
std::function<void (const Image&)> pictureTakenCallback;
CaptureSession captureSession;


+ 2
- 2
modules/juce_video/native/juce_mac_CameraDevice.h View File

@@ -64,7 +64,7 @@ struct CameraDevice::Pimpl
//==============================================================================
bool openedOk() const noexcept { return openingError.isEmpty(); }
void takeStillPicture (std::function<void(const Image&)> pictureTakenCallbackToUse)
void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)
{
if (pictureTakenCallbackToUse == nullptr)
{
@@ -368,7 +368,7 @@ private:
CriticalSection listenerLock;
ListenerList<Listener> listeners;
std::function<void(const Image&)> pictureTakenCallback = nullptr;
std::function<void (const Image&)> pictureTakenCallback = nullptr;
//==============================================================================
JUCE_DECLARE_WEAK_REFERENCEABLE (Pimpl)


+ 2
- 2
modules/juce_video/native/juce_mac_Video.h View File

@@ -76,7 +76,7 @@ struct VideoComponent::Pimpl : public Base
return Result::fail ("Couldn't open movie");
}
void loadAsync (const URL& url, std::function<void(const URL&, Result)> callback)
void loadAsync (const URL& url, std::function<void (const URL&, Result)> callback)
{
if (url.isEmpty())
{
@@ -770,7 +770,7 @@ private:
PlayerController playerController;
std::function<void(const URL&, Result)> loadFinishedCallback;
std::function<void (const URL&, Result)> loadFinishedCallback;
double playSpeedMult = 1.0;


+ 2
- 2
modules/juce_video/native/juce_win32_CameraDevice.h View File

@@ -177,7 +177,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
bool openedOk() const noexcept { return openedSuccessfully; }
void takeStillPicture (std::function<void(const Image&)> pictureTakenCallbackToUse)
void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)
{
{
const ScopedLock sl (pictureTakenCallbackLock);
@@ -551,7 +551,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
ListenerList<Listener> listeners;
CriticalSection pictureTakenCallbackLock;
std::function<void(const Image&)> pictureTakenCallback;
std::function<void (const Image&)> pictureTakenCallback;
bool isRecording = false, openedSuccessfully = false;
int width = 0, height = 0;


+ 1
- 1
modules/juce_video/playback/juce_VideoComponent.cpp View File

@@ -51,7 +51,7 @@ Result VideoComponent::load (const URL& url)
return loadInternal (url, false);
}
void VideoComponent::loadAsync (const URL& url, std::function<void(const URL&, Result)> callback)
void VideoComponent::loadAsync (const URL& url, std::function<void (const URL&, Result)> callback)
{
if (callback == nullptr)
{


+ 2
- 2
modules/juce_video/playback/juce_VideoComponent.h View File

@@ -85,7 +85,7 @@ public:
@see load
*/
void loadAsync (const URL& url, std::function<void(const URL&, Result)> loadFinishedCallback);
void loadAsync (const URL& url, std::function<void (const URL&, Result)> 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<void(const String& /*error*/)> onErrorOccurred;
std::function<void (const String& /*error*/)> onErrorOccurred;
private:
//==============================================================================


Loading…
Cancel
Save