From b5214a341e6e5a3cbeac7fc17d98b8b5157cd9b2 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 5 Jun 2020 09:12:15 +0100 Subject: [PATCH] Normalised lambda whitespace --- .../UserAccount/jucer_LicenseQueryThread.h | 2 +- .../Source/Application/jucer_CommandLine.cpp | 2 +- .../Source/ProjectSaving/jucer_ProjectExport_CLion.h | 2 +- .../Source/ProjectSaving/jucer_ProjectExport_Xcode.h | 2 +- .../Source/ProjectSaving/jucer_ProjectExporter.cpp | 2 +- .../utilities/juce_Interpolators.cpp | 6 +++--- .../juce_audio_basics/utilities/juce_SmoothedValue.h | 4 ++-- .../audio_io/juce_AudioDeviceManager.cpp | 2 +- .../juce_audio_devices/native/juce_android_Oboe.cpp | 2 +- .../native/juce_android_OpenSL.cpp | 2 +- .../juce_audio_devices/native/juce_win32_Midi.cpp | 12 ++++++------ .../juce_audio_devices/native/juce_win32_WASAPI.cpp | 2 +- .../VST/juce_VST_Wrapper.cpp | 4 ++-- .../format_types/juce_AudioUnitPluginFormat.mm | 2 +- .../format_types/juce_VST3PluginFormat.cpp | 2 +- .../processors/juce_AudioProcessor.cpp | 2 +- .../utilities/juce_AudioParameterChoice.cpp | 6 +++--- .../utilities/juce_AudioParameterInt.cpp | 6 +++--- .../utilities/juce_AudioProcessorValueTreeState.cpp | 10 +++++----- .../juce_blocks_basics/blocks/juce_BlocksVersion.cpp | 4 ++-- .../topology/juce_PhysicalTopologySource.cpp | 2 +- modules/juce_core/network/juce_Socket.cpp | 2 +- modules/juce_core/text/juce_CharacterFunctions.h | 2 +- modules/juce_dsp/containers/juce_AudioBlock_test.cpp | 2 +- modules/juce_dsp/filter_design/juce_FilterDesign.cpp | 8 ++++---- modules/juce_events/timers/juce_Timer.cpp | 2 +- modules/juce_graphics/native/juce_android_Fonts.cpp | 2 +- .../native/juce_mac_CoreGraphicsContext.mm | 4 ++-- .../filebrowser/juce_ContentSharer.cpp | 4 ++-- modules/juce_gui_basics/layout/juce_Grid.cpp | 6 +++--- .../native/x11/juce_linux_XWindowSystem.cpp | 2 +- modules/juce_video/capture/juce_CameraDevice.cpp | 2 +- modules/juce_video/native/juce_android_Video.h | 2 +- 33 files changed, 58 insertions(+), 58 deletions(-) diff --git a/extras/Projucer/Source/Application/UserAccount/jucer_LicenseQueryThread.h b/extras/Projucer/Source/Application/UserAccount/jucer_LicenseQueryThread.h index 537583f5d1..16ecc271b6 100644 --- a/extras/Projucer/Source/Application/UserAccount/jucer_LicenseQueryThread.h +++ b/extras/Projucer/Source/Application/UserAccount/jucer_LicenseQueryThread.h @@ -180,7 +180,7 @@ private: licenseTypes.removeEmptyStrings(); licenseTypes.removeDuplicates (false); - licenseState.type = [licenseTypes] () + licenseState.type = [licenseTypes]() { if (licenseTypes.contains ("juce-pro")) return LicenseState::Type::pro; else if (licenseTypes.contains ("juce-indie")) return LicenseState::Type::indie; diff --git a/extras/Projucer/Source/Application/jucer_CommandLine.cpp b/extras/Projucer/Source/Application/jucer_CommandLine.cpp index 8e5836e2e6..2eb849b0c4 100644 --- a/extras/Projucer/Source/Application/jucer_CommandLine.cpp +++ b/extras/Projucer/Source/Application/jucer_CommandLine.cpp @@ -868,7 +868,7 @@ namespace //============================================================================== int performCommandLine (const ArgumentList& args) { - return ConsoleApplication::invokeCatchingFailures ([&] () -> int + return ConsoleApplication::invokeCatchingFailures ([&]() -> int { if (args.containsOption ("--lf")) preferredLineFeed = "\n"; diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h index 4fed3ddaf5..61a9896003 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h @@ -376,7 +376,7 @@ private: if (isCMakeBundle) out << " " << pkgInfoPath << newLine; - auto xcodeIcnsFilePath = [&] () -> String + auto xcodeIcnsFilePath = [&]() -> String { if (exporter.isXcode() && target->getTargetFileType() == build_tools::ProjectType::Target::TargetFileType::executable) diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h index 89f1548b4c..2b8bd751d1 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h @@ -2499,7 +2499,7 @@ private: if (! subprojectInfo.second.isEmpty()) { auto newEnd = std::remove_if (availableBuildProducts.begin(), availableBuildProducts.end(), - [&subprojectInfo](const std::pair &item) + [&subprojectInfo] (const std::pair &item) { return ! subprojectInfo.second.contains (item.first); }); diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp index 33f658c351..5eca19e8a5 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp @@ -33,7 +33,7 @@ //============================================================================== std::vector 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); Graphics g (image); diff --git a/modules/juce_audio_basics/utilities/juce_Interpolators.cpp b/modules/juce_audio_basics/utilities/juce_Interpolators.cpp index 37a39261ff..ef98cfa5e2 100644 --- a/modules/juce_audio_basics/utilities/juce_Interpolators.cpp +++ b/modules/juce_audio_basics/utilities/juce_Interpolators.cpp @@ -33,7 +33,7 @@ private: template void runInterplatorTests (const String& interpolatorName) { - auto createGaussian = [](std::vector& destination, float scale, float centreInSamples, float width) + auto createGaussian = [] (std::vector& destination, float scale, float centreInSamples, float width) { for (size_t i = 0; i < destination.size(); ++i) { @@ -44,7 +44,7 @@ private: FloatVectorOperations::multiply (destination.data(), scale, (int) destination.size()); }; - auto findGaussianPeak = [](const std::vector& input) -> float + auto findGaussianPeak = [] (const std::vector& input) -> float { auto max = std::max_element (std::begin (input), std::end (input)); auto maxPrev = max - 1; @@ -55,7 +55,7 @@ private: return quadraticMaxLoc + (float) std::distance (std::begin (input), max); }; - auto expectAllElementsWithin = [this](const std::vector& v1, const std::vector& v2, float tolerance) + auto expectAllElementsWithin = [this] (const std::vector& v1, const std::vector& v2, float tolerance) { expectEquals ((int) v1.size(), (int) v2.size()); diff --git a/modules/juce_audio_basics/utilities/juce_SmoothedValue.h b/modules/juce_audio_basics/utilities/juce_SmoothedValue.h index 73a83dc2be..d7d4a5db00 100644 --- a/modules/juce_audio_basics/utilities/juce_SmoothedValue.h +++ b/modules/juce_audio_basics/utilities/juce_SmoothedValue.h @@ -522,8 +522,8 @@ public: return result; }; - auto compareData = [this](const AudioBuffer& test, - const AudioBuffer& reference) + auto compareData = [this] (const AudioBuffer& test, + const AudioBuffer& reference) { for (int i = 0; i < test.getNumSamples(); ++i) expectWithinAbsoluteError (test.getSample (0, i), diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp index 9615bc6517..dc2ad8e3bd 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp @@ -517,7 +517,7 @@ AudioIODeviceType* AudioDeviceManager::getCurrentDeviceTypeObject() const 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()) { diff --git a/modules/juce_audio_devices/native/juce_android_Oboe.cpp b/modules/juce_audio_devices/native/juce_android_Oboe.cpp index ad894b01e6..cf3d7ddd7f 100644 --- a/modules/juce_audio_devices/native/juce_android_Oboe.cpp +++ b/modules/juce_audio_devices/native/juce_android_Oboe.cpp @@ -1415,7 +1415,7 @@ public: threadEntryProc (threadUserPtr); threadEntryProc = nullptr; - MessageManager::callAsync ([this] () { delete this; }); + MessageManager::callAsync ([this]() { delete this; }); return oboe::DataCallbackResult::Stop; } diff --git a/modules/juce_audio_devices/native/juce_android_OpenSL.cpp b/modules/juce_audio_devices/native/juce_android_OpenSL.cpp index 15333047d3..8db98afd60 100644 --- a/modules/juce_audio_devices/native/juce_android_OpenSL.cpp +++ b/modules/juce_audio_devices/native/juce_android_OpenSL.cpp @@ -1260,7 +1260,7 @@ public: threadEntryProc = nullptr; (*player)->SetPlayState (player, SL_PLAYSTATE_STOPPED); - MessageManager::callAsync ([this] () { delete this; }); + MessageManager::callAsync ([this]() { delete this; }); } } diff --git a/modules/juce_audio_devices/native/juce_win32_Midi.cpp b/modules/juce_audio_devices/native/juce_win32_Midi.cpp index 982e160f57..86b4e80822 100644 --- a/modules/juce_audio_devices/native/juce_win32_Midi.cpp +++ b/modules/juce_audio_devices/native/juce_win32_Midi.cpp @@ -990,19 +990,19 @@ private: watcher->add_Added ( Callback> ( - [handlerPtr](IDeviceWatcher*, IDeviceInformation* info) { return handlerPtr->addDevice (info); } + [handlerPtr] (IDeviceWatcher*, IDeviceInformation* info) { return handlerPtr->addDevice (info); } ).Get(), &deviceAddedToken); watcher->add_Removed ( Callback> ( - [handlerPtr](IDeviceWatcher*, IDeviceInformationUpdate* infoUpdate) { return handlerPtr->removeDevice (infoUpdate); } + [handlerPtr] (IDeviceWatcher*, IDeviceInformationUpdate* infoUpdate) { return handlerPtr->removeDevice (infoUpdate); } ).Get(), &deviceRemovedToken); watcher->add_Updated ( Callback> ( - [handlerPtr](IDeviceWatcher*, IDeviceInformationUpdate* infoUpdate) { return handlerPtr->updateDevice (infoUpdate); } + [handlerPtr] (IDeviceWatcher*, IDeviceInformationUpdate* infoUpdate) { return handlerPtr->updateDevice (infoUpdate); } ).Get(), &deviceUpdatedToken); @@ -1118,7 +1118,7 @@ private: if (devices.contains (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); JUCE_WINRT_MIDI_LOG ("Removed BLE device: " << removedDeviceId); } @@ -1165,7 +1165,7 @@ private: if (info.isConnected && ! isConnected) { 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; @@ -1580,7 +1580,7 @@ private: auto hr = midiPort->add_MessageReceived ( Callback> ( - [this](IMidiInPort*, IMidiMessageReceivedEventArgs* args) { return midiInMessageReceived (args); } + [this] (IMidiInPort*, IMidiMessageReceivedEventArgs* args) { return midiInMessageReceived (args); } ).Get(), &midiInMessageToken); diff --git a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp index 31d65d5dd0..a706358dda 100644 --- a/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp +++ b/modules/juce_audio_devices/native/juce_win32_WASAPI.cpp @@ -1430,7 +1430,7 @@ private: closeDevices(); initialise(); - auto changedSampleRate = [this, sampleRateChangedByInput] () + auto changedSampleRate = [this, sampleRateChangedByInput]() { if (inputDevice != nullptr && sampleRateChangedByInput) return inputDevice->defaultSampleRate; diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 81bd5a220e..28b205eb16 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -1881,7 +1881,7 @@ private: pointer_sized_int handleCanPlugInDo (VstOpCodeArguments args) { 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") || matches ("receiveVstMidiEvent") @@ -2148,7 +2148,7 @@ namespace if (auto* callbackHandler = dynamic_cast (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); }); diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index 4bd16ea9ef..e063db51af 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -1439,7 +1439,7 @@ public: || 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_Seconds) return "s"; diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index c157f2bc4b..b524abc1f0 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -2788,7 +2788,7 @@ private: bypassParam = param; std::function findOrCreateGroup; - findOrCreateGroup = [&groupMap, &infoMap, &findOrCreateGroup](Vst::UnitID groupID) + findOrCreateGroup = [&groupMap, &infoMap, &findOrCreateGroup] (Vst::UnitID groupID) { auto existingGroup = groupMap.find (groupID); diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index 258ed2e1f7..301b47d7cd 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -773,7 +773,7 @@ void AudioProcessor::audioIOChanged (bool busNumberChanged, bool channelNumChang bus->updateChannelCount(); } - auto countTotalChannels = [](const OwnedArray& buses) noexcept + auto countTotalChannels = [] (const OwnedArray& buses) noexcept { int n = 0; diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp index 4fd4d0ad1d..ebce83081a 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp @@ -27,9 +27,9 @@ AudioParameterChoice::AudioParameterChoice (const String& idToUse, const String& range ([this] { NormalisableRange 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; return rangeWithInterval; }()), diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp index 8b467d9a29..994f7bad22 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp @@ -28,9 +28,9 @@ AudioParameterInt::AudioParameterInt (const String& idToUse, const String& nameT range ([minValue, maxValue] { NormalisableRange 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; return rangeWithInterval; }()), diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp index 137466b691..9c94959ffa 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp @@ -39,7 +39,7 @@ AudioProcessorValueTreeState::Parameter::Parameter (const String& parameterID, labelText, parameterCategory, valueToTextFunction == nullptr ? std::function() - : [valueToTextFunction](float v, int) { return valueToTextFunction (v); }, + : [valueToTextFunction] (float v, int) { return valueToTextFunction (v); }, std::move (textToValueFunction)), unsnappedDefault (valueRange.convertTo0to1 (defaultParameterValue)), metaParameter (isMetaParameter), @@ -155,7 +155,7 @@ private: return; unnormalisedValue = newValue; - listeners.call ([=](Listener& l) { l.parameterChanged (parameter.paramID, unnormalisedValue); }); + listeners.call ([=] (Listener& l) { l.parameterChanged (parameter.paramID, unnormalisedValue); }); listenersNeedCalling = false; needsUpdate = true; } @@ -512,7 +512,7 @@ struct ParameterAdapterTests : public UnitTest beginTest ("Denormalised parameter values can be retrieved"); { - const auto test = [&](NormalisableRange range, float value) + const auto test = [&] (NormalisableRange range, float value) { AudioParameterFloat param ({}, {}, range, {}, {}); AudioProcessorValueTreeState::ParameterAdapter adapter (param); @@ -529,7 +529,7 @@ struct ParameterAdapterTests : public UnitTest beginTest ("Floats can be converted to text"); { - const auto test = [&](NormalisableRange range, float value, String expected) + const auto test = [&] (NormalisableRange range, float value, String expected) { AudioParameterFloat param ({}, {}, range, {}, {}); AudioProcessorValueTreeState::ParameterAdapter adapter (param); @@ -545,7 +545,7 @@ struct ParameterAdapterTests : public UnitTest beginTest ("Text can be converted to floats"); { - const auto test = [&](NormalisableRange range, String text, float expected) + const auto test = [&] (NormalisableRange range, String text, float expected) { AudioParameterFloat param ({}, {}, range, {}, {}); AudioProcessorValueTreeState::ParameterAdapter adapter (param); diff --git a/modules/juce_blocks_basics/blocks/juce_BlocksVersion.cpp b/modules/juce_blocks_basics/blocks/juce_BlocksVersion.cpp index 30260c0f9d..663c20009d 100644 --- a/modules/juce_blocks_basics/blocks/juce_BlocksVersion.cpp +++ b/modules/juce_blocks_basics/blocks/juce_BlocksVersion.cpp @@ -70,7 +70,7 @@ bool BlocksVersion::evaluate (const String& versionString) jassert (result); - auto toInt = [](const std::sub_match match) + auto toInt = [] (const std::sub_match match) { 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 { - auto getReleaseTypePriority = [](const BlocksVersion& version) + auto getReleaseTypePriority = [] (const BlocksVersion& version) { String releaseTypes[4] = { "alpha", "beta", "rc", {} }; diff --git a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp index 9aaab18e83..8ee604d778 100644 --- a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp +++ b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp @@ -113,7 +113,7 @@ void PhysicalTopologySource::setActive (bool shouldBeActive) detector.reset(); } - listeners.call ([](TopologySource::Listener& l){ l.topologyChanged(); }); + listeners.call ([] (TopologySource::Listener& l){ l.topologyChanged(); }); } bool PhysicalTopologySource::isActive() const diff --git a/modules/juce_core/network/juce_Socket.cpp b/modules/juce_core/network/juce_Socket.cpp index 5c5530ce77..64168aa721 100644 --- a/modules/juce_core/network/juce_Socket.cpp +++ b/modules/juce_core/network/juce_Socket.cpp @@ -280,7 +280,7 @@ namespace SocketHelpers if (! lock.isLocked()) return -1; - auto hasErrorOccurred = [&handle] () -> bool + auto hasErrorOccurred = [&handle]() -> bool { auto h = (SocketHandle) handle.load(); diff --git a/modules/juce_core/text/juce_CharacterFunctions.h b/modules/juce_core/text/juce_CharacterFunctions.h index 12bd7a05cc..76c9c5c7bb 100644 --- a/modules/juce_core/text/juce_CharacterFunctions.h +++ b/modules/juce_core/text/juce_CharacterFunctions.h @@ -343,7 +343,7 @@ public: c = *text; - auto writeExponentDigits = [](int exponent, char* destination) + auto writeExponentDigits = [] (int exponent, char* destination) { auto exponentDivisor = 100; diff --git a/modules/juce_dsp/containers/juce_AudioBlock_test.cpp b/modules/juce_dsp/containers/juce_AudioBlock_test.cpp index 2a6ba066ab..9de302245e 100644 --- a/modules/juce_dsp/containers/juce_AudioBlock_test.cpp +++ b/modules/juce_dsp/containers/juce_AudioBlock_test.cpp @@ -292,7 +292,7 @@ public: beginTest ("Process"); { resetBlocks(); - AudioBlock::process (block, otherBlock, [](SampleType x) { return x + (NumericType) 1.0; }); + AudioBlock::process (block, otherBlock, [] (SampleType x) { return x + (NumericType) 1.0; }); expect (otherBlock.getSample (0, 4) == SampleType (6.0)); expect (otherBlock.getSample (1, 4) == SampleType (12.0)); } diff --git a/modules/juce_dsp/filter_design/juce_FilterDesign.cpp b/modules/juce_dsp/filter_design/juce_FilterDesign.cpp index 3b28c462e9..78bd1d0db5 100644 --- a/modules/juce_dsp/filter_design/juce_FilterDesign.cpp +++ b/modules/juce_dsp/filter_design/juce_FilterDesign.cpp @@ -146,8 +146,8 @@ typename FIR::Coefficients::Ptr Matrix b (M + 1, 1), q (2 * M + 1, 1); - auto sinc = [](double x) { return x == 0 ? 1 : std::sin (x * MathConstants::pi) - / (MathConstants::pi * x); }; + auto sinc = [] (double x) { return x == 0 ? 1 : std::sin (x * MathConstants::pi) + / (MathConstants::pi * x); }; auto factorp = wp / MathConstants::pi; auto factors = ws / MathConstants::pi; @@ -184,8 +184,8 @@ typename FIR::Coefficients::Ptr Matrix qp (2 * M, 1); Matrix qs (2 * M, 1); - auto sinc = [](double x) { return x == 0 ? 1 : std::sin (x * MathConstants::pi) - / (MathConstants::pi * x); }; + auto sinc = [] (double x) { return x == 0 ? 1 : std::sin (x * MathConstants::pi) + / (MathConstants::pi * x); }; auto factorp = wp / MathConstants::pi; auto factors = ws / MathConstants::pi; diff --git a/modules/juce_events/timers/juce_Timer.cpp b/modules/juce_events/timers/juce_Timer.cpp index 593dc3e032..85e1398640 100644 --- a/modules/juce_events/timers/juce_Timer.cpp +++ b/modules/juce_events/timers/juce_Timer.cpp @@ -187,7 +187,7 @@ private: // Trying to add a timer that's already here - shouldn't get to this point, // so if you get this assertion, let me know! 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(); diff --git a/modules/juce_graphics/native/juce_android_Fonts.cpp b/modules/juce_graphics/native/juce_android_Fonts.cpp index 5686aa3c6f..33161d51bc 100644 --- a/modules/juce_graphics/native/juce_android_Fonts.cpp +++ b/modules/juce_graphics/native/juce_android_Fonts.cpp @@ -451,7 +451,7 @@ private: static File getCacheDirectory() { - static File result = [] () + static File result = []() { auto appContext = getAppContext(); diff --git a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm index 2349ed09ad..bb03fbe243 100644 --- a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm +++ b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm @@ -120,7 +120,7 @@ public: } else { - auto* imageDataContainer = [](const Image& img) -> HeapBlockContainer::Ptr* + auto* imageDataContainer = [] (const Image& img) -> HeapBlockContainer::Ptr* { if (auto* cgim = dynamic_cast (img.getPixelData())) 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()) { - 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; }; diff --git a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp index 99c689dde3..2acb67cad4 100644 --- a/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_ContentSharer.cpp @@ -69,7 +69,7 @@ private: void finish() { - MessageManager::callAsync ([this] () { owner.filesToSharePrepared(); }); + MessageManager::callAsync ([this]() { owner.filesToSharePrepared(); }); } ContentSharer& owner; @@ -129,7 +129,7 @@ private: void finish() { - MessageManager::callAsync ([this] () { owner.filesToSharePrepared(); }); + MessageManager::callAsync ([this]() { owner.filesToSharePrepared(); }); } ContentSharer& owner; diff --git a/modules/juce_gui_basics/layout/juce_Grid.cpp b/modules/juce_gui_basics/layout/juce_Grid.cpp index 041ad0f3b8..0450f6c18c 100644 --- a/modules/juce_gui_basics/layout/juce_Grid.cpp +++ b/modules/juce_gui_basics/layout/juce_Grid.cpp @@ -847,9 +847,9 @@ struct Grid::AutoPlacement Array& rows, 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; @@ -860,7 +860,7 @@ struct Grid::AutoPlacement return highestRowSize; }; - auto getHighestItemOnColumn = [isSpan](int rowNumber, const ItemPlacementArray& itemPlacementArrayToUse) -> float + auto getHighestItemOnColumn = [isSpan] (int rowNumber, const ItemPlacementArray& itemPlacementArrayToUse) -> float { float highestColumnSize = 0.0f; for (const auto& i : itemPlacementArrayToUse) diff --git a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp index fcf28d7c90..932397462f 100644 --- a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp +++ b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp @@ -2726,7 +2726,7 @@ void XWindowSystem::initialiseXDisplay() // Setup input event handler LinuxEventLoop::registerFdCallback (X11Symbols::getInstance()->xConnectionNumber (display), - [this](int) + [this] (int) { do { diff --git a/modules/juce_video/capture/juce_CameraDevice.cpp b/modules/juce_video/capture/juce_CameraDevice.cpp index d0a50162bb..0c3596c788 100644 --- a/modules/juce_video/capture/juce_CameraDevice.cpp +++ b/modules/juce_video/capture/juce_CameraDevice.cpp @@ -66,7 +66,7 @@ public: 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); diff --git a/modules/juce_video/native/juce_android_Video.h b/modules/juce_video/native/juce_android_Video.h index afc9b7daa5..5ae8c9ceec 100644 --- a/modules/juce_video/native/juce_android_Video.h +++ b/modules/juce_video/native/juce_android_Video.h @@ -1821,7 +1821,7 @@ private: 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()) mediaSession.restoreState();