Browse Source

Normalised lambda whitespace

tags/2021-05-28
ed 5 years ago
parent
commit
b5214a341e
33 changed files with 58 additions and 58 deletions
  1. +1
    -1
      extras/Projucer/Source/Application/UserAccount/jucer_LicenseQueryThread.h
  2. +1
    -1
      extras/Projucer/Source/Application/jucer_CommandLine.cpp
  3. +1
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h
  4. +1
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
  5. +1
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp
  6. +3
    -3
      modules/juce_audio_basics/utilities/juce_Interpolators.cpp
  7. +2
    -2
      modules/juce_audio_basics/utilities/juce_SmoothedValue.h
  8. +1
    -1
      modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp
  9. +1
    -1
      modules/juce_audio_devices/native/juce_android_Oboe.cpp
  10. +1
    -1
      modules/juce_audio_devices/native/juce_android_OpenSL.cpp
  11. +6
    -6
      modules/juce_audio_devices/native/juce_win32_Midi.cpp
  12. +1
    -1
      modules/juce_audio_devices/native/juce_win32_WASAPI.cpp
  13. +2
    -2
      modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
  14. +1
    -1
      modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm
  15. +1
    -1
      modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp
  16. +1
    -1
      modules/juce_audio_processors/processors/juce_AudioProcessor.cpp
  17. +3
    -3
      modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp
  18. +3
    -3
      modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp
  19. +5
    -5
      modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp
  20. +2
    -2
      modules/juce_blocks_basics/blocks/juce_BlocksVersion.cpp
  21. +1
    -1
      modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp
  22. +1
    -1
      modules/juce_core/network/juce_Socket.cpp
  23. +1
    -1
      modules/juce_core/text/juce_CharacterFunctions.h
  24. +1
    -1
      modules/juce_dsp/containers/juce_AudioBlock_test.cpp
  25. +4
    -4
      modules/juce_dsp/filter_design/juce_FilterDesign.cpp
  26. +1
    -1
      modules/juce_events/timers/juce_Timer.cpp
  27. +1
    -1
      modules/juce_graphics/native/juce_android_Fonts.cpp
  28. +2
    -2
      modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm
  29. +2
    -2
      modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp
  30. +3
    -3
      modules/juce_gui_basics/layout/juce_Grid.cpp
  31. +1
    -1
      modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp
  32. +1
    -1
      modules/juce_video/capture/juce_CameraDevice.cpp
  33. +1
    -1
      modules/juce_video/native/juce_android_Video.h

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

@@ -180,7 +180,7 @@ private:
licenseTypes.removeEmptyStrings(); licenseTypes.removeEmptyStrings();
licenseTypes.removeDuplicates (false); licenseTypes.removeDuplicates (false);
licenseState.type = [licenseTypes] ()
licenseState.type = [licenseTypes]()
{ {
if (licenseTypes.contains ("juce-pro")) return LicenseState::Type::pro; if (licenseTypes.contains ("juce-pro")) return LicenseState::Type::pro;
else if (licenseTypes.contains ("juce-indie")) return LicenseState::Type::indie; else if (licenseTypes.contains ("juce-indie")) return LicenseState::Type::indie;


+ 1
- 1
extras/Projucer/Source/Application/jucer_CommandLine.cpp View File

@@ -868,7 +868,7 @@ namespace
//============================================================================== //==============================================================================
int performCommandLine (const ArgumentList& args) int performCommandLine (const ArgumentList& args)
{ {
return ConsoleApplication::invokeCatchingFailures ([&] () -> int
return ConsoleApplication::invokeCatchingFailures ([&]() -> int
{ {
if (args.containsOption ("--lf")) if (args.containsOption ("--lf"))
preferredLineFeed = "\n"; preferredLineFeed = "\n";


+ 1
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h View File

@@ -376,7 +376,7 @@ private:
if (isCMakeBundle) if (isCMakeBundle)
out << " " << pkgInfoPath << newLine; out << " " << pkgInfoPath << newLine;
auto xcodeIcnsFilePath = [&] () -> String
auto xcodeIcnsFilePath = [&]() -> String
{ {
if (exporter.isXcode() if (exporter.isXcode()
&& target->getTargetFileType() == build_tools::ProjectType::Target::TargetFileType::executable) && target->getTargetFileType() == build_tools::ProjectType::Target::TargetFileType::executable)


+ 1
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h View File

@@ -2499,7 +2499,7 @@ private:
if (! subprojectInfo.second.isEmpty()) if (! subprojectInfo.second.isEmpty())
{ {
auto newEnd = std::remove_if (availableBuildProducts.begin(), availableBuildProducts.end(), auto newEnd = std::remove_if (availableBuildProducts.begin(), availableBuildProducts.end(),
[&subprojectInfo](const std::pair<String, String> &item)
[&subprojectInfo] (const std::pair<String, String> &item)
{ {
return ! subprojectInfo.second.contains (item.first); return ! subprojectInfo.second.contains (item.first);
}); });


+ 1
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp View File

@@ -33,7 +33,7 @@
//============================================================================== //==============================================================================
std::vector<ProjectExporter::ExporterTypeInfo> ProjectExporter::getExporterTypeInfos() std::vector<ProjectExporter::ExporterTypeInfo> ProjectExporter::getExporterTypeInfos()
{ {
auto createIcon = [](const void* iconData, size_t iconDataSize)
auto createIcon = [] (const void* iconData, size_t iconDataSize)
{ {
Image image (Image::ARGB, 200, 200, true); Image image (Image::ARGB, 200, 200, true);
Graphics g (image); Graphics g (image);


+ 3
- 3
modules/juce_audio_basics/utilities/juce_Interpolators.cpp View File

@@ -33,7 +33,7 @@ private:
template<typename InterpolatorType> template<typename InterpolatorType>
void runInterplatorTests (const String& interpolatorName) void runInterplatorTests (const String& interpolatorName)
{ {
auto createGaussian = [](std::vector<float>& destination, float scale, float centreInSamples, float width)
auto createGaussian = [] (std::vector<float>& destination, float scale, float centreInSamples, float width)
{ {
for (size_t i = 0; i < destination.size(); ++i) for (size_t i = 0; i < destination.size(); ++i)
{ {
@@ -44,7 +44,7 @@ private:
FloatVectorOperations::multiply (destination.data(), scale, (int) destination.size()); FloatVectorOperations::multiply (destination.data(), scale, (int) destination.size());
}; };
auto findGaussianPeak = [](const std::vector<float>& input) -> float
auto findGaussianPeak = [] (const std::vector<float>& input) -> float
{ {
auto max = std::max_element (std::begin (input), std::end (input)); auto max = std::max_element (std::begin (input), std::end (input));
auto maxPrev = max - 1; auto maxPrev = max - 1;
@@ -55,7 +55,7 @@ private:
return quadraticMaxLoc + (float) std::distance (std::begin (input), max); return quadraticMaxLoc + (float) std::distance (std::begin (input), max);
}; };
auto expectAllElementsWithin = [this](const std::vector<float>& v1, const std::vector<float>& v2, float tolerance)
auto expectAllElementsWithin = [this] (const std::vector<float>& v1, const std::vector<float>& v2, float tolerance)
{ {
expectEquals ((int) v1.size(), (int) v2.size()); expectEquals ((int) v1.size(), (int) v2.size());


+ 2
- 2
modules/juce_audio_basics/utilities/juce_SmoothedValue.h View File

@@ -522,8 +522,8 @@ public:
return result; return result;
}; };
auto compareData = [this](const AudioBuffer<float>& test,
const AudioBuffer<float>& reference)
auto compareData = [this] (const AudioBuffer<float>& test,
const AudioBuffer<float>& reference)
{ {
for (int i = 0; i < test.getNumSamples(); ++i) for (int i = 0; i < test.getNumSamples(); ++i)
expectWithinAbsoluteError (test.getSample (0, i), expectWithinAbsoluteError (test.getSample (0, i),


+ 1
- 1
modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp View File

@@ -517,7 +517,7 @@ AudioIODeviceType* AudioDeviceManager::getCurrentDeviceTypeObject() const
static void updateSetupChannels (AudioDeviceManager::AudioDeviceSetup& setup, int defaultNumIns, int defaultNumOuts) static void updateSetupChannels (AudioDeviceManager::AudioDeviceSetup& setup, int defaultNumIns, int defaultNumOuts)
{ {
auto updateChannels = [](const String& deviceName, BigInteger& channels, int defaultNumChannels)
auto updateChannels = [] (const String& deviceName, BigInteger& channels, int defaultNumChannels)
{ {
if (deviceName.isEmpty()) if (deviceName.isEmpty())
{ {


+ 1
- 1
modules/juce_audio_devices/native/juce_android_Oboe.cpp View File

@@ -1415,7 +1415,7 @@ public:
threadEntryProc (threadUserPtr); threadEntryProc (threadUserPtr);
threadEntryProc = nullptr; threadEntryProc = nullptr;
MessageManager::callAsync ([this] () { delete this; });
MessageManager::callAsync ([this]() { delete this; });
return oboe::DataCallbackResult::Stop; return oboe::DataCallbackResult::Stop;
} }


+ 1
- 1
modules/juce_audio_devices/native/juce_android_OpenSL.cpp View File

@@ -1260,7 +1260,7 @@ public:
threadEntryProc = nullptr; threadEntryProc = nullptr;
(*player)->SetPlayState (player, SL_PLAYSTATE_STOPPED); (*player)->SetPlayState (player, SL_PLAYSTATE_STOPPED);
MessageManager::callAsync ([this] () { delete this; });
MessageManager::callAsync ([this]() { delete this; });
} }
} }


+ 6
- 6
modules/juce_audio_devices/native/juce_win32_Midi.cpp View File

@@ -990,19 +990,19 @@ private:
watcher->add_Added ( watcher->add_Added (
Callback<ITypedEventHandler<DeviceWatcher*, DeviceInformation*>> ( Callback<ITypedEventHandler<DeviceWatcher*, DeviceInformation*>> (
[handlerPtr](IDeviceWatcher*, IDeviceInformation* info) { return handlerPtr->addDevice (info); }
[handlerPtr] (IDeviceWatcher*, IDeviceInformation* info) { return handlerPtr->addDevice (info); }
).Get(), ).Get(),
&deviceAddedToken); &deviceAddedToken);
watcher->add_Removed ( watcher->add_Removed (
Callback<ITypedEventHandler<DeviceWatcher*, DeviceInformationUpdate*>> ( Callback<ITypedEventHandler<DeviceWatcher*, DeviceInformationUpdate*>> (
[handlerPtr](IDeviceWatcher*, IDeviceInformationUpdate* infoUpdate) { return handlerPtr->removeDevice (infoUpdate); }
[handlerPtr] (IDeviceWatcher*, IDeviceInformationUpdate* infoUpdate) { return handlerPtr->removeDevice (infoUpdate); }
).Get(), ).Get(),
&deviceRemovedToken); &deviceRemovedToken);
watcher->add_Updated ( watcher->add_Updated (
Callback<ITypedEventHandler<DeviceWatcher*, DeviceInformationUpdate*>> ( Callback<ITypedEventHandler<DeviceWatcher*, DeviceInformationUpdate*>> (
[handlerPtr](IDeviceWatcher*, IDeviceInformationUpdate* infoUpdate) { return handlerPtr->updateDevice (infoUpdate); }
[handlerPtr] (IDeviceWatcher*, IDeviceInformationUpdate* infoUpdate) { return handlerPtr->updateDevice (infoUpdate); }
).Get(), ).Get(),
&deviceUpdatedToken); &deviceUpdatedToken);
@@ -1118,7 +1118,7 @@ private:
if (devices.contains (removedDeviceId)) if (devices.contains (removedDeviceId))
{ {
auto& info = devices.getReference (removedDeviceId); auto& info = devices.getReference (removedDeviceId);
listeners.call ([&info](Listener& l) { l.bleDeviceDisconnected (info.containerID); });
listeners.call ([&info] (Listener& l) { l.bleDeviceDisconnected (info.containerID); });
devices.remove (removedDeviceId); devices.remove (removedDeviceId);
JUCE_WINRT_MIDI_LOG ("Removed BLE device: " << removedDeviceId); JUCE_WINRT_MIDI_LOG ("Removed BLE device: " << removedDeviceId);
} }
@@ -1165,7 +1165,7 @@ private:
if (info.isConnected && ! isConnected) if (info.isConnected && ! isConnected)
{ {
JUCE_WINRT_MIDI_LOG ("BLE device connection status change: " << updatedDeviceId << " " << info.containerID << " " << (isConnected ? "connected" : "disconnected")); JUCE_WINRT_MIDI_LOG ("BLE device connection status change: " << updatedDeviceId << " " << info.containerID << " " << (isConnected ? "connected" : "disconnected"));
listeners.call ([&info](Listener& l) { l.bleDeviceDisconnected (info.containerID); });
listeners.call ([&info] (Listener& l) { l.bleDeviceDisconnected (info.containerID); });
} }
info.isConnected = isConnected; info.isConnected = isConnected;
@@ -1580,7 +1580,7 @@ private:
auto hr = midiPort->add_MessageReceived ( auto hr = midiPort->add_MessageReceived (
Callback<ITypedEventHandler<MidiInPort*, MidiMessageReceivedEventArgs*>> ( Callback<ITypedEventHandler<MidiInPort*, MidiMessageReceivedEventArgs*>> (
[this](IMidiInPort*, IMidiMessageReceivedEventArgs* args) { return midiInMessageReceived (args); }
[this] (IMidiInPort*, IMidiMessageReceivedEventArgs* args) { return midiInMessageReceived (args); }
).Get(), ).Get(),
&midiInMessageToken); &midiInMessageToken);


+ 1
- 1
modules/juce_audio_devices/native/juce_win32_WASAPI.cpp View File

@@ -1430,7 +1430,7 @@ private:
closeDevices(); closeDevices();
initialise(); initialise();
auto changedSampleRate = [this, sampleRateChangedByInput] ()
auto changedSampleRate = [this, sampleRateChangedByInput]()
{ {
if (inputDevice != nullptr && sampleRateChangedByInput) if (inputDevice != nullptr && sampleRateChangedByInput)
return inputDevice->defaultSampleRate; return inputDevice->defaultSampleRate;


+ 2
- 2
modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp View File

@@ -1881,7 +1881,7 @@ private:
pointer_sized_int handleCanPlugInDo (VstOpCodeArguments args) pointer_sized_int handleCanPlugInDo (VstOpCodeArguments args)
{ {
auto text = (const char*) args.ptr; auto text = (const char*) args.ptr;
auto matches = [=](const char* s) { return strcmp (text, s) == 0; };
auto matches = [=] (const char* s) { return strcmp (text, s) == 0; };
if (matches ("receiveVstEvents") if (matches ("receiveVstEvents")
|| matches ("receiveVstMidiEvent") || matches ("receiveVstMidiEvent")
@@ -2148,7 +2148,7 @@ namespace
if (auto* callbackHandler = dynamic_cast<VSTCallbackHandler*> (processor)) if (auto* callbackHandler = dynamic_cast<VSTCallbackHandler*> (processor))
{ {
callbackHandler->handleVstHostCallbackAvailable ([audioMaster, aEffect](int32 opcode, int32 index, pointer_sized_int value, void* ptr, float opt)
callbackHandler->handleVstHostCallbackAvailable ([audioMaster, aEffect] (int32 opcode, int32 index, pointer_sized_int value, void* ptr, float opt)
{ {
return audioMaster (aEffect, opcode, index, value, ptr, opt); return audioMaster (aEffect, opcode, index, value, ptr, opt);
}); });


+ 1
- 1
modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm View File

@@ -1439,7 +1439,7 @@ public:
|| info.unit == kAudioUnitParameterUnit_Boolean); || info.unit == kAudioUnitParameterUnit_Boolean);
bool isBoolean = info.unit == kAudioUnitParameterUnit_Boolean; bool isBoolean = info.unit == kAudioUnitParameterUnit_Boolean;
auto label = [info] () -> String
auto label = [info]() -> String
{ {
if (info.unit == kAudioUnitParameterUnit_Percent) return "%"; if (info.unit == kAudioUnitParameterUnit_Percent) return "%";
if (info.unit == kAudioUnitParameterUnit_Seconds) return "s"; if (info.unit == kAudioUnitParameterUnit_Seconds) return "s";


+ 1
- 1
modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp View File

@@ -2788,7 +2788,7 @@ private:
bypassParam = param; bypassParam = param;
std::function<AudioProcessorParameterGroup*(Vst::UnitID)> findOrCreateGroup; std::function<AudioProcessorParameterGroup*(Vst::UnitID)> findOrCreateGroup;
findOrCreateGroup = [&groupMap, &infoMap, &findOrCreateGroup](Vst::UnitID groupID)
findOrCreateGroup = [&groupMap, &infoMap, &findOrCreateGroup] (Vst::UnitID groupID)
{ {
auto existingGroup = groupMap.find (groupID); auto existingGroup = groupMap.find (groupID);


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

@@ -773,7 +773,7 @@ void AudioProcessor::audioIOChanged (bool busNumberChanged, bool channelNumChang
bus->updateChannelCount(); bus->updateChannelCount();
} }
auto countTotalChannels = [](const OwnedArray<AudioProcessor::Bus>& buses) noexcept
auto countTotalChannels = [] (const OwnedArray<AudioProcessor::Bus>& buses) noexcept
{ {
int n = 0; int n = 0;


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

@@ -27,9 +27,9 @@ AudioParameterChoice::AudioParameterChoice (const String& idToUse, const String&
range ([this] range ([this]
{ {
NormalisableRange<float> rangeWithInterval { 0.0f, choices.size() - 1.0f, NormalisableRange<float> rangeWithInterval { 0.0f, choices.size() - 1.0f,
[](float, float end, float v) { return jlimit (0.0f, end, v * end); },
[](float, float end, float v) { return jlimit (0.0f, 1.0f, v / end); },
[](float start, float end, float v) { return (float) roundToInt (juce::jlimit (start, end, v)); } };
[] (float, float end, float v) { return jlimit (0.0f, end, v * end); },
[] (float, float end, float v) { return jlimit (0.0f, 1.0f, v / end); },
[] (float start, float end, float v) { return (float) roundToInt (juce::jlimit (start, end, v)); } };
rangeWithInterval.interval = 1.0f; rangeWithInterval.interval = 1.0f;
return rangeWithInterval; return rangeWithInterval;
}()), }()),


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

@@ -28,9 +28,9 @@ AudioParameterInt::AudioParameterInt (const String& idToUse, const String& nameT
range ([minValue, maxValue] range ([minValue, maxValue]
{ {
NormalisableRange<float> rangeWithInterval { (float) minValue, (float) maxValue, NormalisableRange<float> rangeWithInterval { (float) minValue, (float) maxValue,
[](float start, float end, float v) { return jlimit (start, end, v * (end - start) + start); },
[](float start, float end, float v) { return jlimit (0.0f, 1.0f, (v - start) / (end - start)); },
[](float start, float end, float v) { return (float) roundToInt (juce::jlimit (start, end, v)); } };
[] (float start, float end, float v) { return jlimit (start, end, v * (end - start) + start); },
[] (float start, float end, float v) { return jlimit (0.0f, 1.0f, (v - start) / (end - start)); },
[] (float start, float end, float v) { return (float) roundToInt (juce::jlimit (start, end, v)); } };
rangeWithInterval.interval = 1.0f; rangeWithInterval.interval = 1.0f;
return rangeWithInterval; return rangeWithInterval;
}()), }()),


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

@@ -39,7 +39,7 @@ AudioProcessorValueTreeState::Parameter::Parameter (const String& parameterID,
labelText, labelText,
parameterCategory, parameterCategory,
valueToTextFunction == nullptr ? std::function<String (float v, int)>() valueToTextFunction == nullptr ? std::function<String (float v, int)>()
: [valueToTextFunction](float v, int) { return valueToTextFunction (v); },
: [valueToTextFunction] (float v, int) { return valueToTextFunction (v); },
std::move (textToValueFunction)), std::move (textToValueFunction)),
unsnappedDefault (valueRange.convertTo0to1 (defaultParameterValue)), unsnappedDefault (valueRange.convertTo0to1 (defaultParameterValue)),
metaParameter (isMetaParameter), metaParameter (isMetaParameter),
@@ -155,7 +155,7 @@ private:
return; return;
unnormalisedValue = newValue; unnormalisedValue = newValue;
listeners.call ([=](Listener& l) { l.parameterChanged (parameter.paramID, unnormalisedValue); });
listeners.call ([=] (Listener& l) { l.parameterChanged (parameter.paramID, unnormalisedValue); });
listenersNeedCalling = false; listenersNeedCalling = false;
needsUpdate = true; needsUpdate = true;
} }
@@ -512,7 +512,7 @@ struct ParameterAdapterTests : public UnitTest
beginTest ("Denormalised parameter values can be retrieved"); beginTest ("Denormalised parameter values can be retrieved");
{ {
const auto test = [&](NormalisableRange<float> range, float value)
const auto test = [&] (NormalisableRange<float> range, float value)
{ {
AudioParameterFloat param ({}, {}, range, {}, {}); AudioParameterFloat param ({}, {}, range, {}, {});
AudioProcessorValueTreeState::ParameterAdapter adapter (param); AudioProcessorValueTreeState::ParameterAdapter adapter (param);
@@ -529,7 +529,7 @@ struct ParameterAdapterTests : public UnitTest
beginTest ("Floats can be converted to text"); beginTest ("Floats can be converted to text");
{ {
const auto test = [&](NormalisableRange<float> range, float value, String expected)
const auto test = [&] (NormalisableRange<float> range, float value, String expected)
{ {
AudioParameterFloat param ({}, {}, range, {}, {}); AudioParameterFloat param ({}, {}, range, {}, {});
AudioProcessorValueTreeState::ParameterAdapter adapter (param); AudioProcessorValueTreeState::ParameterAdapter adapter (param);
@@ -545,7 +545,7 @@ struct ParameterAdapterTests : public UnitTest
beginTest ("Text can be converted to floats"); beginTest ("Text can be converted to floats");
{ {
const auto test = [&](NormalisableRange<float> range, String text, float expected)
const auto test = [&] (NormalisableRange<float> range, String text, float expected)
{ {
AudioParameterFloat param ({}, {}, range, {}, {}); AudioParameterFloat param ({}, {}, range, {}, {});
AudioProcessorValueTreeState::ParameterAdapter adapter (param); AudioProcessorValueTreeState::ParameterAdapter adapter (param);


+ 2
- 2
modules/juce_blocks_basics/blocks/juce_BlocksVersion.cpp View File

@@ -70,7 +70,7 @@ bool BlocksVersion::evaluate (const String& versionString)
jassert (result); jassert (result);
auto toInt = [](const std::sub_match<const char*> match)
auto toInt = [] (const std::sub_match<const char*> match)
{ {
return std::atoi (match.str().c_str()); return std::atoi (match.str().c_str());
}; };
@@ -108,7 +108,7 @@ bool BlocksVersion::isGreaterThan (const BlocksVersion& other) const
bool BlocksVersion::releaseTypeGreaterThan (const BlocksVersion& other) const bool BlocksVersion::releaseTypeGreaterThan (const BlocksVersion& other) const
{ {
auto getReleaseTypePriority = [](const BlocksVersion& version)
auto getReleaseTypePriority = [] (const BlocksVersion& version)
{ {
String releaseTypes[4] = { "alpha", "beta", "rc", {} }; String releaseTypes[4] = { "alpha", "beta", "rc", {} };


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

@@ -113,7 +113,7 @@ void PhysicalTopologySource::setActive (bool shouldBeActive)
detector.reset(); detector.reset();
} }
listeners.call ([](TopologySource::Listener& l){ l.topologyChanged(); });
listeners.call ([] (TopologySource::Listener& l){ l.topologyChanged(); });
} }
bool PhysicalTopologySource::isActive() const bool PhysicalTopologySource::isActive() const


+ 1
- 1
modules/juce_core/network/juce_Socket.cpp View File

@@ -280,7 +280,7 @@ namespace SocketHelpers
if (! lock.isLocked()) if (! lock.isLocked())
return -1; return -1;
auto hasErrorOccurred = [&handle] () -> bool
auto hasErrorOccurred = [&handle]() -> bool
{ {
auto h = (SocketHandle) handle.load(); auto h = (SocketHandle) handle.load();


+ 1
- 1
modules/juce_core/text/juce_CharacterFunctions.h View File

@@ -343,7 +343,7 @@ public:
c = *text; c = *text;
auto writeExponentDigits = [](int exponent, char* destination)
auto writeExponentDigits = [] (int exponent, char* destination)
{ {
auto exponentDivisor = 100; auto exponentDivisor = 100;


+ 1
- 1
modules/juce_dsp/containers/juce_AudioBlock_test.cpp View File

@@ -292,7 +292,7 @@ public:
beginTest ("Process"); beginTest ("Process");
{ {
resetBlocks(); resetBlocks();
AudioBlock<SampleType>::process (block, otherBlock, [](SampleType x) { return x + (NumericType) 1.0; });
AudioBlock<SampleType>::process (block, otherBlock, [] (SampleType x) { return x + (NumericType) 1.0; });
expect (otherBlock.getSample (0, 4) == SampleType (6.0)); expect (otherBlock.getSample (0, 4) == SampleType (6.0));
expect (otherBlock.getSample (1, 4) == SampleType (12.0)); expect (otherBlock.getSample (1, 4) == SampleType (12.0));
} }


+ 4
- 4
modules/juce_dsp/filter_design/juce_FilterDesign.cpp View File

@@ -146,8 +146,8 @@ typename FIR::Coefficients<FloatType>::Ptr
Matrix<double> b (M + 1, 1), Matrix<double> b (M + 1, 1),
q (2 * M + 1, 1); q (2 * M + 1, 1);
auto sinc = [](double x) { return x == 0 ? 1 : std::sin (x * MathConstants<double>::pi)
/ (MathConstants<double>::pi * x); };
auto sinc = [] (double x) { return x == 0 ? 1 : std::sin (x * MathConstants<double>::pi)
/ (MathConstants<double>::pi * x); };
auto factorp = wp / MathConstants<double>::pi; auto factorp = wp / MathConstants<double>::pi;
auto factors = ws / MathConstants<double>::pi; auto factors = ws / MathConstants<double>::pi;
@@ -184,8 +184,8 @@ typename FIR::Coefficients<FloatType>::Ptr
Matrix<double> qp (2 * M, 1); Matrix<double> qp (2 * M, 1);
Matrix<double> qs (2 * M, 1); Matrix<double> qs (2 * M, 1);
auto sinc = [](double x) { return x == 0 ? 1 : std::sin (x * MathConstants<double>::pi)
/ (MathConstants<double>::pi * x); };
auto sinc = [] (double x) { return x == 0 ? 1 : std::sin (x * MathConstants<double>::pi)
/ (MathConstants<double>::pi * x); };
auto factorp = wp / MathConstants<double>::pi; auto factorp = wp / MathConstants<double>::pi;
auto factors = ws / MathConstants<double>::pi; auto factors = ws / MathConstants<double>::pi;


+ 1
- 1
modules/juce_events/timers/juce_Timer.cpp View File

@@ -187,7 +187,7 @@ private:
// Trying to add a timer that's already here - shouldn't get to this point, // Trying to add a timer that's already here - shouldn't get to this point,
// so if you get this assertion, let me know! // so if you get this assertion, let me know!
jassert (std::find_if (timers.begin(), timers.end(), jassert (std::find_if (timers.begin(), timers.end(),
[t](TimerCountdown i) { return i.timer == t; }) == timers.end());
[t] (TimerCountdown i) { return i.timer == t; }) == timers.end());
auto pos = timers.size(); auto pos = timers.size();


+ 1
- 1
modules/juce_graphics/native/juce_android_Fonts.cpp View File

@@ -451,7 +451,7 @@ private:
static File getCacheDirectory() static File getCacheDirectory()
{ {
static File result = [] ()
static File result = []()
{ {
auto appContext = getAppContext(); auto appContext = getAppContext();


+ 2
- 2
modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm View File

@@ -120,7 +120,7 @@ public:
} }
else else
{ {
auto* imageDataContainer = [](const Image& img) -> HeapBlockContainer::Ptr*
auto* imageDataContainer = [] (const Image& img) -> HeapBlockContainer::Ptr*
{ {
if (auto* cgim = dynamic_cast<CoreGraphicsPixelData*> (img.getPixelData())) if (auto* cgim = dynamic_cast<CoreGraphicsPixelData*> (img.getPixelData()))
return new HeapBlockContainer::Ptr (cgim->imageDataHolder); return new HeapBlockContainer::Ptr (cgim->imageDataHolder);
@@ -637,7 +637,7 @@ void CoreGraphicsContext::drawGlyph (int glyphNumber, const AffineTransform& tra
{ {
if (state->fontRef != nullptr && state->fillType.isColour()) if (state->fontRef != nullptr && state->fillType.isColour())
{ {
auto cgTransformIsOnlyTranslation = [](CGAffineTransform t)
auto cgTransformIsOnlyTranslation = [] (CGAffineTransform t)
{ {
return t.a == 1.0f && t.d == 1.0f && t.b == 0.0f && t.c == 0.0f; return t.a == 1.0f && t.d == 1.0f && t.b == 0.0f && t.c == 0.0f;
}; };


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

@@ -69,7 +69,7 @@ private:
void finish() void finish()
{ {
MessageManager::callAsync ([this] () { owner.filesToSharePrepared(); });
MessageManager::callAsync ([this]() { owner.filesToSharePrepared(); });
} }
ContentSharer& owner; ContentSharer& owner;
@@ -129,7 +129,7 @@ private:
void finish() void finish()
{ {
MessageManager::callAsync ([this] () { owner.filesToSharePrepared(); });
MessageManager::callAsync ([this]() { owner.filesToSharePrepared(); });
} }
ContentSharer& owner; ContentSharer& owner;


+ 3
- 3
modules/juce_gui_basics/layout/juce_Grid.cpp View File

@@ -847,9 +847,9 @@ struct Grid::AutoPlacement
Array<Grid::TrackInfo>& rows, Array<Grid::TrackInfo>& rows,
const ItemPlacementArray& itemPlacementArray) const ItemPlacementArray& itemPlacementArray)
{ {
auto isSpan = [](Grid::PlacementHelpers::LineRange r) -> bool { return std::abs (r.end - r.start) > 1; };
auto isSpan = [] (Grid::PlacementHelpers::LineRange r) -> bool { return std::abs (r.end - r.start) > 1; };
auto getHighestItemOnRow = [isSpan](int rowNumber, const ItemPlacementArray& itemPlacementArrayToUse) -> float
auto getHighestItemOnRow = [isSpan] (int rowNumber, const ItemPlacementArray& itemPlacementArrayToUse) -> float
{ {
float highestRowSize = 0.0f; float highestRowSize = 0.0f;
@@ -860,7 +860,7 @@ struct Grid::AutoPlacement
return highestRowSize; return highestRowSize;
}; };
auto getHighestItemOnColumn = [isSpan](int rowNumber, const ItemPlacementArray& itemPlacementArrayToUse) -> float
auto getHighestItemOnColumn = [isSpan] (int rowNumber, const ItemPlacementArray& itemPlacementArrayToUse) -> float
{ {
float highestColumnSize = 0.0f; float highestColumnSize = 0.0f;
for (const auto& i : itemPlacementArrayToUse) for (const auto& i : itemPlacementArrayToUse)


+ 1
- 1
modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp View File

@@ -2726,7 +2726,7 @@ void XWindowSystem::initialiseXDisplay()
// Setup input event handler // Setup input event handler
LinuxEventLoop::registerFdCallback (X11Symbols::getInstance()->xConnectionNumber (display), LinuxEventLoop::registerFdCallback (X11Symbols::getInstance()->xConnectionNumber (display),
[this](int)
[this] (int)
{ {
do do
{ {


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

@@ -66,7 +66,7 @@ public:
auto& pendingOpen = camerasToOpen.getReference (camerasToOpen.size() - 1); auto& pendingOpen = camerasToOpen.getReference (camerasToOpen.size() - 1);
pendingOpen.device->pimpl->open ([this](const String& deviceId, const String& error)
pendingOpen.device->pimpl->open ([this] (const String& deviceId, const String& error)
{ {
int cIndex = getCameraIndex (deviceId); int cIndex = getCameraIndex (deviceId);


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

@@ -1821,7 +1821,7 @@ private:
JUCE_VIDEO_LOG ("App resumed, restoring media player..."); JUCE_VIDEO_LOG ("App resumed, restoring media player...");
loadAsync (currentURL, [this](const URL&, Result r)
loadAsync (currentURL, [this] (const URL&, Result r)
{ {
if (r.wasOk()) if (r.wasOk())
mediaSession.restoreState(); mediaSession.restoreState();


Loading…
Cancel
Save