Browse Source

Minor whitespace tidying

tags/2021-05-28
ed 6 years ago
parent
commit
1a46fb3a5f
42 changed files with 106 additions and 106 deletions
  1. +3
    -3
      modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp
  2. +1
    -1
      modules/juce_audio_processors/format/juce_AudioPluginFormat.h
  3. +3
    -3
      modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp
  4. +1
    -1
      modules/juce_audio_processors/format/juce_AudioPluginFormatManager.h
  5. +2
    -2
      modules/juce_audio_processors/processors/juce_AudioProcessor.h
  6. +2
    -2
      modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp
  7. +4
    -4
      modules/juce_audio_processors/utilities/juce_AudioParameterBool.h
  8. +2
    -2
      modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp
  9. +4
    -4
      modules/juce_audio_processors/utilities/juce_AudioParameterChoice.h
  10. +2
    -2
      modules/juce_audio_processors/utilities/juce_AudioParameterFloat.cpp
  11. +4
    -4
      modules/juce_audio_processors/utilities/juce_AudioParameterFloat.h
  12. +2
    -2
      modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp
  13. +4
    -4
      modules/juce_audio_processors/utilities/juce_AudioParameterInt.h
  14. +5
    -5
      modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp
  15. +3
    -3
      modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h
  16. +1
    -1
      modules/juce_blocks_basics/blocks/juce_Block.h
  17. +1
    -1
      modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp
  18. +1
    -1
      modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h
  19. +1
    -1
      modules/juce_core/containers/juce_Variant.h
  20. +3
    -3
      modules/juce_core/maths/juce_NormalisableRange.h
  21. +1
    -1
      modules/juce_core/misc/juce_RuntimePermissions.h
  22. +3
    -3
      modules/juce_core/native/juce_android_JNIHelpers.cpp
  23. +1
    -1
      modules/juce_core/native/juce_android_JNIHelpers.h
  24. +4
    -4
      modules/juce_dsp/maths/juce_LookupTable.cpp
  25. +5
    -5
      modules/juce_dsp/maths/juce_LookupTable.h
  26. +3
    -3
      modules/juce_dsp/processors/juce_Oscillator.h
  27. +6
    -6
      modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp
  28. +6
    -6
      modules/juce_gui_basics/filebrowser/juce_ContentSharer.h
  29. +2
    -2
      modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp
  30. +2
    -2
      modules/juce_gui_basics/filebrowser/juce_FileChooser.h
  31. +2
    -2
      modules/juce_gui_basics/widgets/juce_Slider.h
  32. +1
    -1
      modules/juce_osc/osc/juce_OSCReceiver.h
  33. +1
    -1
      modules/juce_video/capture/juce_CameraDevice.cpp
  34. +3
    -3
      modules/juce_video/capture/juce_CameraDevice.h
  35. +3
    -3
      modules/juce_video/native/juce_android_CameraDevice.h
  36. +2
    -2
      modules/juce_video/native/juce_android_Video.h
  37. +3
    -3
      modules/juce_video/native/juce_ios_CameraDevice.h
  38. +2
    -2
      modules/juce_video/native/juce_mac_CameraDevice.h
  39. +2
    -2
      modules/juce_video/native/juce_mac_Video.h
  40. +2
    -2
      modules/juce_video/native/juce_win32_CameraDevice.h
  41. +1
    -1
      modules/juce_video/playback/juce_VideoComponent.cpp
  42. +2
    -2
      modules/juce_video/playback/juce_VideoComponent.h

+ 3
- 3
modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp View File

@@ -174,11 +174,11 @@ void AudioPluginFormat::createPluginInstanceAsync (const PluginDescription& desc
void AudioPluginFormat::createPluginInstanceAsync (const PluginDescription& description,
double initialSampleRate,
int initialBufferSize,
std::function<void (AudioPluginInstance*, const String&)> f)
std::function<void(AudioPluginInstance*, const String&)> f)
{
struct CallbackInvoker : public AudioPluginFormat::InstantiationCompletionCallback
{
CallbackInvoker (std::function<void (AudioPluginInstance*, const String&)> inCompletion)
CallbackInvoker (std::function<void(AudioPluginInstance*, const String&)> inCompletion)
: completion (inCompletion)
{}
@@ -187,7 +187,7 @@ void AudioPluginFormat::createPluginInstanceAsync (const PluginDescription& desc
completion (instance, error);
}
std::function<void (AudioPluginInstance*, const String&)> completion;
std::function<void(AudioPluginInstance*, const String&)> completion;
};
createPluginInstanceAsync (description, initialSampleRate, initialBufferSize, new CallbackInvoker (f));


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

@@ -98,7 +98,7 @@ public:
void createPluginInstanceAsync (const PluginDescription& description,
double initialSampleRate,
int initialBufferSize,
std::function<void (AudioPluginInstance*, const String&)> completionCallback);
std::function<void(AudioPluginInstance*, const String&)> completionCallback);
/** Should do a quick check to see if this file or directory might be a plugin of
this format.


+ 3
- 3
modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp View File

@@ -46,7 +46,7 @@ namespace PluginFormatManagerHelpers
struct ErrorLambdaOnMessageThread : public CallbackMessage
{
ErrorLambdaOnMessageThread (const String& inError,
std::function<void (AudioPluginInstance*, const String&)> f)
std::function<void(AudioPluginInstance*, const String&)> f)
: error (inError), lambda (f)
{
}
@@ -54,7 +54,7 @@ namespace PluginFormatManagerHelpers
void messageCallback() override { lambda (nullptr, error); }
String error;
std::function<void (AudioPluginInstance*, const String&)> lambda;
std::function<void(AudioPluginInstance*, const String&)> lambda;
};
}
@@ -145,7 +145,7 @@ void AudioPluginFormatManager::createPluginInstanceAsync (const PluginDescriptio
void AudioPluginFormatManager::createPluginInstanceAsync (const PluginDescription& description,
double initialSampleRate,
int initialBufferSize,
std::function<void (AudioPluginInstance*, const String&)> f)
std::function<void(AudioPluginInstance*, const String&)> f)
{
String error;


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

@@ -119,7 +119,7 @@ public:
void createPluginInstanceAsync (const PluginDescription& description,
double initialSampleRate,
int initialBufferSize,
std::function<void (AudioPluginInstance*, const String&)> completionCallback);
std::function<void(AudioPluginInstance*, const String&)> completionCallback);
/** Checks that the file or component for this plugin actually still exists.


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

@@ -1367,8 +1367,8 @@ public:
Unknown = -1
};
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
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.
// An host can use to indicate where on the curve the current signal is (for example


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

@@ -29,8 +29,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

@@ -52,8 +52,8 @@ public:
*/
AudioParameterBool (const String& parameterID, const String& name, bool defaultValue,
const String& label = 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;
@@ -90,8 +90,8 @@ private:
const NormalisableRange<float> range { 0.0f, 1.0f, 1.0f };
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

@@ -29,8 +29,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 (0.0f, choices.size() - 1.0f,
[](float, float end, float v) { return jlimit (0.0f, end, v * end); },


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

@@ -56,8 +56,8 @@ public:
const StringArray& choices,
int defaultItemIndex,
const String& label = 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;
@@ -102,8 +102,8 @@ private:
const NormalisableRange<float> range;
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

@@ -30,8 +30,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

@@ -59,8 +59,8 @@ public:
float defaultValue,
const String& label = String(),
Category category = 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.
@@ -108,8 +108,8 @@ private:
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

@@ -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<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 ((float) minValue, (float) maxValue,
[](float start, float end, float v) { return jlimit (start, end, v * (end - start) + start); },


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

@@ -57,8 +57,8 @@ public:
int minValue, int maxValue,
int defaultValue,
const String& label = 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;
@@ -98,8 +98,8 @@ private:
const NormalisableRange<float> range;
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

@@ -33,8 +33,8 @@ AudioProcessorValueTreeState::Parameter::Parameter (const String& parameterID,
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,
bool isAutomatableParameter,
bool isDiscrete,
@@ -46,7 +46,7 @@ AudioProcessorValueTreeState::Parameter::Parameter (const String& parameterID,
defaultValue,
labelText,
category,
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 (defaultValue)),
@@ -252,8 +252,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,


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

@@ -262,8 +262,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,
@@ -516,7 +516,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));
//==============================================================================


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

@@ -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<void (uint8, uint32)> packetAckCallback) = 0;
std::function<void(uint8, uint32)> packetAckCallback) = 0;
/** Provides a callback that will be called when a config changes. */
virtual void setConfigChangedCallback (std::function<void(Block&, const ConfigMetaData&, uint32)>) = 0;


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

@@ -384,7 +384,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 = {};


+ 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

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


+ 3
- 3
modules/juce_core/maths/juce_NormalisableRange.h View File

@@ -125,9 +125,9 @@ public:
*/
NormalisableRange (ValueType rangeStart,
ValueType rangeEnd,
std::function<ValueType (ValueType currentRangeStart, ValueType currentRangeEnd, ValueType normalisedValue)> convertFrom0To1Func,
std::function<ValueType (ValueType currentRangeStart, ValueType currentRangeEnd, ValueType mappedValue)> convertTo0To1Func,
std::function<ValueType (ValueType currentRangeStart, ValueType currentRangeEnd, ValueType valueToSnap)> snapToLegalValueFunc = nullptr) noexcept
std::function<ValueType(ValueType currentRangeStart, ValueType currentRangeEnd, ValueType normalisedValue)> convertFrom0To1Func,
std::function<ValueType(ValueType currentRangeStart, ValueType currentRangeEnd, ValueType mappedValue)> convertTo0To1Func,
std::function<ValueType(ValueType currentRangeStart, ValueType currentRangeEnd, ValueType valueToSnap)> snapToLegalValueFunc = nullptr) noexcept
: start (rangeStart),
end (rangeEnd),
convertFrom0To1Function (convertFrom0To1Func),


+ 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

@@ -606,7 +606,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))
{}
@@ -628,11 +628,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

@@ -966,7 +966,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

@@ -36,7 +36,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);
@@ -44,7 +44,7 @@ LookupTable<FloatType>::LookupTable (const std::function<FloatType (size_t)>& fu
//==============================================================================
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)));
@@ -72,7 +72,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)
@@ -98,7 +98,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

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


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

@@ -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<NumericType (NumericType)>& function,
Oscillator (const std::function<NumericType(NumericType)>& function,
size_t lookupTableNumPoints = 0)
{
initialise (function, lookupTableNumPoints);
@@ -61,7 +61,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)
@@ -240,7 +240,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) };


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

@@ -152,7 +152,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_IOS || JUCE_ANDROID
startNewShare (callbackToUse);
@@ -169,7 +169,7 @@ void ContentSharer::shareFiles (const Array<URL>& files,
}
#if JUCE_IOS || JUCE_ANDROID
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!
@@ -190,7 +190,7 @@ void ContentSharer::startNewShare (std::function<void (bool, const String&)> cal
#endif
void ContentSharer::shareText (const String& text,
std::function<void (bool, const String&)> callbackToUse)
std::function<void(bool, const String&)> callbackToUse)
{
#if JUCE_IOS || JUCE_ANDROID
startNewShare (callbackToUse);
@@ -207,7 +207,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_IOS || JUCE_ANDROID
@@ -240,7 +240,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_IOS || JUCE_ANDROID
startNewShare (callbackToUse);
@@ -257,7 +257,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

@@ -53,7 +53,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.
@@ -63,7 +63,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
@@ -87,7 +87,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
@@ -100,7 +100,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();
@@ -108,7 +108,7 @@ private:
Array<File> temporaryFiles;
std::function<void (bool, String)> callback;
std::function<void(bool, String)> callback;
#if JUCE_IOS || JUCE_ANDROID
struct Pimpl
@@ -121,7 +121,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

@@ -169,7 +169,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
@@ -254,7 +254,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

@@ -209,7 +209,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);
//==============================================================================
@@ -310,7 +310,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>&);


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

@@ -606,10 +606,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_osc/osc/juce_OSCReceiver.h View File

@@ -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<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.


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

@@ -159,7 +159,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

@@ -73,7 +73,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,
@@ -127,7 +127,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.
@@ -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<void (const String& /*error*/)> onErrorOccurred;
std::function<void(const String& /*error*/)> onErrorOccurred;
//==============================================================================
/**


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

@@ -487,7 +487,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,
@@ -563,7 +563,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)
{
@@ -2935,7 +2935,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

@@ -401,7 +401,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;
@@ -1750,7 +1750,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

@@ -26,7 +26,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*/,
@@ -75,7 +75,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

@@ -123,7 +123,7 @@ struct CameraDevice::Pimpl
refreshConnections();
}
void takeStillPicture (std::function<void (const Image&)> pictureTakenCallbackToUse)
void takeStillPicture (std::function<void(const Image&)> pictureTakenCallbackToUse)
{
if (pictureTakenCallbackToUse == nullptr)
{
@@ -259,7 +259,7 @@ struct CameraDevice::Pimpl
CriticalSection listenerLock;
ListenerList<Listener> listeners;
std::function<void (const Image&)> pictureTakenCallback;
std::function<void(const Image&)> pictureTakenCallback;
JUCE_DECLARE_WEAK_REFERENCEABLE (Pimpl)


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

@@ -82,7 +82,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())
{
@@ -774,7 +774,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

@@ -185,7 +185,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);
@@ -559,7 +559,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

@@ -74,7 +74,7 @@ Result VideoComponent::load (const URL& url)
#endif
}
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

@@ -91,7 +91,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();
@@ -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<void (const String& /*error*/)> onErrorOccurred;
std::function<void(const String& /*error*/)> onErrorOccurred;
private:
//==============================================================================


Loading…
Cancel
Save