From 158220ddfa0addc1169633c0090a151151b4aa8c Mon Sep 17 00:00:00 2001 From: Anthony Nicholls Date: Fri, 6 Oct 2023 08:59:50 +0100 Subject: [PATCH] Formatting: Use nested namespace definitions --- .clang-tidy | 1 + .../utils/juce_BinaryResourceFile.cpp | 9 ++- .../utils/juce_BinaryResourceFile.h | 9 ++- .../utils/juce_BuildHelperFunctions.cpp | 9 ++- .../utils/juce_BuildHelperFunctions.h | 9 ++- .../utils/juce_CppTokeniserFunctions.cpp | 9 ++- .../utils/juce_Entitlements.cpp | 9 ++- .../utils/juce_Entitlements.h | 9 ++- .../juce_build_tools/utils/juce_Icons.cpp | 9 ++- .../Build/juce_build_tools/utils/juce_Icons.h | 9 ++- .../utils/juce_PlistOptions.cpp | 9 ++- .../utils/juce_PlistOptions.h | 9 ++- .../juce_build_tools/utils/juce_ProjectType.h | 9 ++- .../utils/juce_RelativePath.h | 9 ++- .../utils/juce_ResourceFileHelpers.cpp | 9 ++- .../utils/juce_ResourceFileHelpers.h | 9 ++- .../utils/juce_ResourceRc.cpp | 9 ++- .../juce_build_tools/utils/juce_ResourceRc.h | 9 ++- .../utils/juce_VersionNumbers.cpp | 9 ++- .../utils/juce_VersionNumbers.h | 9 ++- .../midi/ump/juce_UMPConversion.h | 7 +-- .../midi/ump/juce_UMPConverters.h | 7 +-- .../midi/ump/juce_UMPDispatcher.h | 7 +-- .../midi/ump/juce_UMPFactory.h | 7 +-- .../midi/ump/juce_UMPIterator.cpp | 7 +-- .../midi/ump/juce_UMPIterator.h | 7 +-- .../ump/juce_UMPMidi1ToBytestreamTranslator.h | 7 +-- .../juce_UMPMidi1ToMidi2DefaultTranslator.cpp | 7 +-- .../juce_UMPMidi1ToMidi2DefaultTranslator.h | 7 +-- .../midi/ump/juce_UMPProtocols.h | 7 +-- .../midi/ump/juce_UMPReceiver.h | 7 +-- .../midi/ump/juce_UMPSysEx7.cpp | 7 +-- .../midi/ump/juce_UMPSysEx7.h | 7 +-- .../midi/ump/juce_UMPUtils.cpp | 7 +-- .../midi/ump/juce_UMPUtils.h | 7 +-- .../midi/ump/juce_UMPView.cpp | 7 +-- .../juce_audio_basics/midi/ump/juce_UMPView.h | 7 +-- .../midi/ump/juce_UMP_test.cpp | 7 +-- .../midi/ump/juce_UMPacket.h | 7 +-- .../midi/ump/juce_UMPackets.h | 7 +-- .../audio_io/juce_SampleRateHelpers.cpp | 7 +-- .../ump/juce_UMPBytestreamInputHandler.h | 7 +-- .../midi_io/ump/juce_UMPU32InputHandler.h | 8 +-- ...juce_HighPerformanceAudioHelpers_android.h | 8 +-- .../native/juce_WASAPI_windows.cpp | 2 +- .../juce_audio_plugin_client_LV2.cpp | 7 +-- .../format_types/juce_LV2Common.h | 7 +-- .../format_types/juce_LV2PluginFormat.cpp | 2 +- .../format_types/juce_LV2Resources.h | 7 +-- .../utilities/juce_ExtensionsVisitor.h | 9 +-- .../juce_FixedSizeFunction_test.cpp | 2 +- .../unit_tests/juce_UnitTestCategories.h | 7 +-- modules/juce_dsp/containers/juce_AudioBlock.h | 7 +-- .../containers/juce_AudioBlock_test.cpp | 7 +-- .../juce_dsp/containers/juce_SIMDRegister.h | 11 +--- .../containers/juce_SIMDRegister_test.cpp | 7 +-- .../filter_design/juce_FilterDesign.cpp | 7 +-- .../filter_design/juce_FilterDesign.h | 7 +-- .../juce_dsp/frequency/juce_Convolution.cpp | 7 +-- modules/juce_dsp/frequency/juce_Convolution.h | 7 +-- .../frequency/juce_Convolution_test.cpp | 7 +-- modules/juce_dsp/frequency/juce_FFT.cpp | 7 +-- modules/juce_dsp/frequency/juce_FFT.h | 7 +-- modules/juce_dsp/frequency/juce_FFT_test.cpp | 7 +-- modules/juce_dsp/frequency/juce_Windowing.cpp | 7 +-- modules/juce_dsp/frequency/juce_Windowing.h | 7 +-- modules/juce_dsp/juce_dsp.cpp | 1 - modules/juce_dsp/juce_dsp.h | 60 +++++++++---------- .../maths/juce_FastMathApproximations.h | 7 +-- modules/juce_dsp/maths/juce_LogRampedValue.h | 7 +-- .../maths/juce_LogRampedValue_test.cpp | 7 +-- modules/juce_dsp/maths/juce_LookupTable.cpp | 7 +-- modules/juce_dsp/maths/juce_LookupTable.h | 7 +-- modules/juce_dsp/maths/juce_Matrix.cpp | 7 +-- modules/juce_dsp/maths/juce_Matrix.h | 7 +-- modules/juce_dsp/maths/juce_Matrix_test.cpp | 7 +-- modules/juce_dsp/maths/juce_Phase.h | 7 +-- modules/juce_dsp/maths/juce_Polynomial.h | 7 +-- .../juce_dsp/maths/juce_SpecialFunctions.cpp | 7 +-- .../juce_dsp/maths/juce_SpecialFunctions.h | 8 +-- .../native/juce_SIMDNativeOps_avx.cpp | 41 ++++++------- .../juce_dsp/native/juce_SIMDNativeOps_avx.h | 7 +-- .../native/juce_SIMDNativeOps_fallback.h | 7 +-- .../native/juce_SIMDNativeOps_neon.cpp | 39 ++++++------ .../juce_dsp/native/juce_SIMDNativeOps_neon.h | 7 +-- .../native/juce_SIMDNativeOps_sse.cpp | 41 ++++++------- .../juce_dsp/native/juce_SIMDNativeOps_sse.h | 7 +-- .../processors/juce_BallisticsFilter.cpp | 7 +-- .../processors/juce_BallisticsFilter.h | 7 +-- .../juce_dsp/processors/juce_DelayLine.cpp | 7 +-- modules/juce_dsp/processors/juce_DelayLine.h | 7 +-- .../juce_dsp/processors/juce_DryWetMixer.cpp | 7 +-- .../juce_dsp/processors/juce_DryWetMixer.h | 7 +-- .../juce_dsp/processors/juce_FIRFilter.cpp | 7 +-- modules/juce_dsp/processors/juce_FIRFilter.h | 11 +--- .../processors/juce_FIRFilter_test.cpp | 7 +-- .../processors/juce_FirstOrderTPTFilter.cpp | 7 +-- .../processors/juce_FirstOrderTPTFilter.h | 7 +-- .../juce_dsp/processors/juce_IIRFilter.cpp | 10 +--- modules/juce_dsp/processors/juce_IIRFilter.h | 13 +--- .../juce_dsp/processors/juce_IIRFilter_Impl.h | 10 +--- .../processors/juce_LinkwitzRileyFilter.cpp | 7 +-- .../processors/juce_LinkwitzRileyFilter.h | 7 +-- .../juce_dsp/processors/juce_Oversampling.cpp | 7 +-- .../juce_dsp/processors/juce_Oversampling.h | 7 +-- modules/juce_dsp/processors/juce_Panner.cpp | 7 +-- modules/juce_dsp/processors/juce_Panner.h | 7 +-- .../juce_dsp/processors/juce_ProcessContext.h | 7 +-- .../juce_dsp/processors/juce_ProcessorChain.h | 7 +-- .../processors/juce_ProcessorChain_test.cpp | 7 +-- .../processors/juce_ProcessorDuplicator.h | 7 +-- .../processors/juce_ProcessorWrapper.h | 7 +-- .../processors/juce_StateVariableFilter.h | 11 +--- .../juce_StateVariableTPTFilter.cpp | 7 +-- .../processors/juce_StateVariableTPTFilter.h | 7 +-- modules/juce_dsp/widgets/juce_Bias.h | 7 +-- modules/juce_dsp/widgets/juce_Chorus.cpp | 7 +-- modules/juce_dsp/widgets/juce_Chorus.h | 7 +-- modules/juce_dsp/widgets/juce_Compressor.cpp | 7 +-- modules/juce_dsp/widgets/juce_Compressor.h | 7 +-- modules/juce_dsp/widgets/juce_Gain.h | 7 +-- .../juce_dsp/widgets/juce_LadderFilter.cpp | 7 +-- modules/juce_dsp/widgets/juce_LadderFilter.h | 7 +-- modules/juce_dsp/widgets/juce_Limiter.cpp | 7 +-- modules/juce_dsp/widgets/juce_Limiter.h | 7 +-- modules/juce_dsp/widgets/juce_NoiseGate.cpp | 7 +-- modules/juce_dsp/widgets/juce_NoiseGate.h | 7 +-- modules/juce_dsp/widgets/juce_Oscillator.h | 7 +-- modules/juce_dsp/widgets/juce_Phaser.cpp | 7 +-- modules/juce_dsp/widgets/juce_Phaser.h | 7 +-- modules/juce_dsp/widgets/juce_Reverb.h | 7 +-- modules/juce_dsp/widgets/juce_WaveShaper.h | 7 +-- .../juce_events/native/juce_EventLoop_linux.h | 7 +-- modules/juce_graphics/colour/juce_Colours.h | 9 +-- .../native/juce_RenderingHelpers.h | 9 +-- .../layout/juce_AnimatedPositionBehaviours.h | 9 +-- .../juce_ComInterfaces_windows.h | 7 +-- .../misc/juce_LiveConstantEditor.cpp | 9 +-- .../misc/juce_LiveConstantEditor.h | 10 +--- modules/juce_opengl/opengl/juce_gl.h | 7 +-- modules/juce_opengl/opengl/juce_gles2.h | 7 +-- modules/juce_opengl/opengl/juce_wgl.h | 7 +-- 142 files changed, 398 insertions(+), 800 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 9890187cc3..93504dc1cd 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,6 +3,7 @@ Checks: > -clang-analyzer-optin.performance.Padding, -clang-analyzer-security.FloatLoopCounter, -clang-analyzer-security.insecureAPI.strcpy, + modernize-concat-nested-namespaces, WarningsAsErrors: '*' diff --git a/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp b/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp index c6ff12dd58..ea7e27167f 100644 --- a/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp +++ b/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + static const char* resourceFileIdentifierString = "JUCER_BINARY_RESOURCE"; //============================================================================== @@ -285,5 +284,5 @@ namespace build_tools return { Result::ok(), std::move (filesCreated) }; } -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.h b/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.h index 420bbf1e74..79a2499e15 100644 --- a/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.h +++ b/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.h @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + class ResourceFile { public: @@ -70,5 +69,5 @@ namespace build_tools JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ResourceFile) }; -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.cpp b/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.cpp index 0131d8a566..15636f5a83 100644 --- a/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.cpp +++ b/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.cpp @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + void overwriteFileIfDifferentOrThrow (const File& file, const MemoryOutputStream& newData) { if (! overwriteFileWithNewDataIfDifferent (file, newData)) @@ -355,5 +354,5 @@ namespace build_tools writer (mo); overwriteFileIfDifferentOrThrow (file, mo); } -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.h b/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.h index 6319c34ba8..3113617199 100644 --- a/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.h +++ b/extras/Build/juce_build_tools/utils/juce_BuildHelperFunctions.h @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + void overwriteFileIfDifferentOrThrow (const File& file, const MemoryOutputStream& newData); void overwriteFileIfDifferentOrThrow (const File& file, const String& newData); @@ -82,5 +81,5 @@ namespace build_tools String getRelativePathFrom (const File& file, const File& sourceFolder); void writeStreamToFile (const File& file, const std::function& writer); -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_CppTokeniserFunctions.cpp b/extras/Build/juce_build_tools/utils/juce_CppTokeniserFunctions.cpp index 3346648da9..4e88874741 100644 --- a/extras/Build/juce_build_tools/utils/juce_CppTokeniserFunctions.cpp +++ b/extras/Build/juce_build_tools/utils/juce_CppTokeniserFunctions.cpp @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + static bool isReservedKeyword (String::CharPointerType token, const int tokenLength) noexcept { static const char* const keywords2Char[] = @@ -202,5 +201,5 @@ namespace build_tools } } } -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp b/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp index cc7840f70f..3696035050 100644 --- a/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp +++ b/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce:: build_tools { + String EntitlementOptions::getEntitlementsFileContent() const { String content = @@ -132,5 +131,5 @@ namespace build_tools return entitlements; } -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_Entitlements.h b/extras/Build/juce_build_tools/utils/juce_Entitlements.h index 1449998301..dd8f60e3e1 100644 --- a/extras/Build/juce_build_tools/utils/juce_Entitlements.h +++ b/extras/Build/juce_build_tools/utils/juce_Entitlements.h @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + struct EntitlementOptions final { String getEntitlementsFileContent() const; @@ -61,5 +60,5 @@ namespace build_tools private: StringPairArray getEntitlements() const; }; -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_Icons.cpp b/extras/Build/juce_build_tools/utils/juce_Icons.cpp index ef50072612..3620efbde5 100644 --- a/extras/Build/juce_build_tools/utils/juce_Icons.cpp +++ b/extras/Build/juce_build_tools/utils/juce_Icons.cpp @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + Array asArray (const Icons& icons) { Array result; @@ -495,5 +494,5 @@ namespace build_tools return { assets, targetFolder, RelativePath::buildTargetFolder }; } -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_Icons.h b/extras/Build/juce_build_tools/utils/juce_Icons.h index f843b754f0..7f2dbdd0f3 100644 --- a/extras/Build/juce_build_tools/utils/juce_Icons.h +++ b/extras/Build/juce_build_tools/utils/juce_Icons.h @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + struct Icons { std::unique_ptr small; @@ -45,5 +44,5 @@ namespace build_tools RelativePath createXcassetsFolderFromIcons (const Icons& icons, const File& targetFolder, String projectFilenameRootString); -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp b/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp index 6f263b16e6..522002db49 100644 --- a/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp +++ b/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + //============================================================================== static XmlElement* getKeyWithName (XmlElement& xml, const String& key) { @@ -374,5 +373,5 @@ namespace build_tools return { plistKey, plistEntry }; } -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_PlistOptions.h b/extras/Build/juce_build_tools/utils/juce_PlistOptions.h index 9a30faf0f0..856147685f 100644 --- a/extras/Build/juce_build_tools/utils/juce_PlistOptions.h +++ b/extras/Build/juce_build_tools/utils/juce_PlistOptions.h @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + class PlistOptions final { public: @@ -103,5 +102,5 @@ namespace build_tools Array createExtraAudioUnitTargetPlistOptions() const; Array createExtraAudioUnitV3TargetPlistOptions() const; }; -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_ProjectType.h b/extras/Build/juce_build_tools/utils/juce_ProjectType.h index 32161eb6a2..0bd67eff71 100644 --- a/extras/Build/juce_build_tools/utils/juce_ProjectType.h +++ b/extras/Build/juce_build_tools/utils/juce_ProjectType.h @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + //============================================================================== class ProjectType { @@ -321,5 +320,5 @@ namespace build_tools return Array (&guiApp, &consoleApp, &staticLib, &dll, &plugin, &araplugin); } -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_RelativePath.h b/extras/Build/juce_build_tools/utils/juce_RelativePath.h index eb61d49632..0782845757 100644 --- a/extras/Build/juce_build_tools/utils/juce_RelativePath.h +++ b/extras/Build/juce_build_tools/utils/juce_RelativePath.h @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + //============================================================================== /** Manipulates a cross-platform partial file path. (Needed because File is designed for absolute paths on the active OS) @@ -125,5 +124,5 @@ namespace build_tools return currentWorkingDirectory.getChildFile (path); } }; -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_ResourceFileHelpers.cpp b/extras/Build/juce_build_tools/utils/juce_ResourceFileHelpers.cpp index 24ecc92127..00aecfdf00 100644 --- a/extras/Build/juce_build_tools/utils/juce_ResourceFileHelpers.cpp +++ b/extras/Build/juce_build_tools/utils/juce_ResourceFileHelpers.cpp @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + uint64 calculateStreamHashCode (InputStream& in) { uint64 t = 0; @@ -87,5 +86,5 @@ namespace build_tools const char* const utf8 = newData.toUTF8(); return overwriteFileWithNewDataIfDifferent (file, utf8, strlen (utf8)); } -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_ResourceFileHelpers.h b/extras/Build/juce_build_tools/utils/juce_ResourceFileHelpers.h index f1b86792bb..a10bb99af7 100644 --- a/extras/Build/juce_build_tools/utils/juce_ResourceFileHelpers.h +++ b/extras/Build/juce_build_tools/utils/juce_ResourceFileHelpers.h @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce:: build_tools { + uint64 calculateStreamHashCode (InputStream& in); uint64 calculateFileHashCode (const File& file); uint64 calculateMemoryHashCode (const void* data, size_t numBytes); @@ -34,5 +33,5 @@ namespace build_tools bool overwriteFileWithNewDataIfDifferent (const File& file, const void* data, size_t numBytes); bool overwriteFileWithNewDataIfDifferent (const File& file, const MemoryOutputStream& newData); bool overwriteFileWithNewDataIfDifferent (const File& file, const String& newData); -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_ResourceRc.cpp b/extras/Build/juce_build_tools/utils/juce_ResourceRc.cpp index a5d6bf8d86..dfb0a49efe 100644 --- a/extras/Build/juce_build_tools/utils/juce_ResourceRc.cpp +++ b/extras/Build/juce_build_tools/utils/juce_ResourceRc.cpp @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + static String getCommaSeparatedVersionNumber (const String& version) { auto versionParts = StringArray::fromTokens (version, ",.", ""); @@ -93,5 +92,5 @@ namespace build_tools overwriteFileIfDifferentOrThrow (resourceRcFile, mo); } -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_ResourceRc.h b/extras/Build/juce_build_tools/utils/juce_ResourceRc.h index 1538942595..d68edd4ea8 100644 --- a/extras/Build/juce_build_tools/utils/juce_ResourceRc.h +++ b/extras/Build/juce_build_tools/utils/juce_ResourceRc.h @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + class ResourceRcOptions final { public: @@ -39,5 +38,5 @@ namespace build_tools String projectName; File icon; }; -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_VersionNumbers.cpp b/extras/Build/juce_build_tools/utils/juce_VersionNumbers.cpp index 34321543b7..e66c6379e3 100644 --- a/extras/Build/juce_build_tools/utils/juce_VersionNumbers.cpp +++ b/extras/Build/juce_build_tools/utils/juce_VersionNumbers.cpp @@ -23,10 +23,9 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + StringArray getVersionSegments (StringRef p) { auto segments = StringArray::fromTokens (p, ",.", ""); @@ -56,5 +55,5 @@ namespace build_tools { return "0x" + String::toHexString (getVersionAsHexInteger (versionString)); } -} -} + +} // namespace juce::build_tools diff --git a/extras/Build/juce_build_tools/utils/juce_VersionNumbers.h b/extras/Build/juce_build_tools/utils/juce_VersionNumbers.h index c5a3c1c144..31cbfcc62d 100644 --- a/extras/Build/juce_build_tools/utils/juce_VersionNumbers.h +++ b/extras/Build/juce_build_tools/utils/juce_VersionNumbers.h @@ -23,15 +23,14 @@ ============================================================================== */ -namespace juce -{ -namespace build_tools +namespace juce::build_tools { + StringArray getVersionSegments (StringRef p); int getVersionAsHexIntegerFromParts (const StringArray& versionString); int getVersionAsHexInteger (StringRef versionString); String getVersionAsHex (StringRef versionString); -} -} + +} // namespace juce::build_tools diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPConversion.h b/modules/juce_audio_basics/midi/ump/juce_UMPConversion.h index f28cc76560..7001d878d2 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPConversion.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPConversion.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** Represents a MIDI message that happened at a particular time. @@ -352,7 +350,6 @@ struct Conversion } }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPConverters.h b/modules/juce_audio_basics/midi/ump/juce_UMPConverters.h index 8f51f13af7..0893bc71ef 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPConverters.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPConverters.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** Allows conversion from bytestream- or Universal MIDI Packet-formatted @@ -182,7 +180,6 @@ namespace universal_midi_packets Midi1ToBytestreamTranslator translator; }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPDispatcher.h b/modules/juce_audio_basics/midi/ump/juce_UMPDispatcher.h index f5eb8873d0..380686999d 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPDispatcher.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPDispatcher.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -196,7 +194,6 @@ private: ToBytestreamConverter converter; }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPFactory.h b/modules/juce_audio_basics/midi/ump/juce_UMPFactory.h index 9f1e265634..dbc239b632 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPFactory.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPFactory.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -532,7 +530,6 @@ struct Factory } }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPIterator.cpp b/modules/juce_audio_basics/midi/ump/juce_UMPIterator.cpp index 0ba7ce0758..0addc813d8 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPIterator.cpp +++ b/modules/juce_audio_basics/midi/ump/juce_UMPIterator.cpp @@ -20,9 +20,7 @@ ============================================================================== */ -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { Iterator::Iterator (const uint32_t* ptr, [[maybe_unused]] size_t bytes) noexcept @@ -33,5 +31,4 @@ Iterator::Iterator (const uint32_t* ptr, [[maybe_unused]] size_t bytes) noexcept { } -} // namespace universal_midi_packets -} // namespace juce +} // namespace juce::universal_midi_packets diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPIterator.h b/modules/juce_audio_basics/midi/ump/juce_UMPIterator.h index eba6202956..6087b41244 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPIterator.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPIterator.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -117,7 +115,6 @@ private: #endif }; -} // namespace universal_midi_packets -} // namespace juce +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToBytestreamTranslator.h b/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToBytestreamTranslator.h index e1b268b53f..ca41919ca4 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToBytestreamTranslator.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToBytestreamTranslator.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -212,7 +210,6 @@ private: double pendingSysExTime = 0.0; }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp b/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp index 6964809263..7508893cfa 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp +++ b/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToMidi2DefaultTranslator.cpp @@ -20,9 +20,7 @@ ============================================================================== */ -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { PacketX2 Midi1ToMidi2DefaultTranslator::processNoteOnOrOff (const HelperValues helpers) @@ -197,5 +195,4 @@ bool Midi1ToMidi2DefaultTranslator::PnAccumulator::addByte (uint8_t cc, std::byt return true; } -} -} +} // namespace juce::universal_midi_packets diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h b/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h index 0d6a3631ef..d71e491992 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPMidi1ToMidi2DefaultTranslator.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -185,7 +183,6 @@ private: std::array groupBanks; }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPProtocols.h b/modules/juce_audio_basics/midi/ump/juce_UMPProtocols.h index 78792bbf50..c0df33bb67 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPProtocols.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPProtocols.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** The kinds of MIDI protocol that can be formatted into Universal MIDI Packets. */ @@ -42,7 +40,6 @@ enum class MidiProtocol UMP_MIDI_2_0, }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPReceiver.h b/modules/juce_audio_basics/midi/ump/juce_UMPReceiver.h index 6f2cac67b8..5705ed65be 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPReceiver.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPReceiver.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -40,7 +38,6 @@ struct Receiver virtual void packetReceived (const View& packet, double time) = 0; }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPSysEx7.cpp b/modules/juce_audio_basics/midi/ump/juce_UMPSysEx7.cpp index eaea29f13a..45ba0c9747 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPSysEx7.cpp +++ b/modules/juce_audio_basics/midi/ump/juce_UMPSysEx7.cpp @@ -20,9 +20,7 @@ ============================================================================== */ -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { uint32_t SysEx7::getNumPacketsRequiredForDataSize (uint32_t size) @@ -49,5 +47,4 @@ SysEx7::PacketBytes SysEx7::getDataBytes (const PacketX2& packet) }; } -} -} +} // namespace juce::universal_midi_packets diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPSysEx7.h b/modules/juce_audio_basics/midi/ump/juce_UMPSysEx7.h index c08313c0cf..c061a4e0b9 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPSysEx7.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPSysEx7.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -71,7 +69,6 @@ struct SysEx7 static PacketBytes getDataBytes (const PacketX2& packet); }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPUtils.cpp b/modules/juce_audio_basics/midi/ump/juce_UMPUtils.cpp index 353672f83e..556e2638ad 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPUtils.cpp +++ b/modules/juce_audio_basics/midi/ump/juce_UMPUtils.cpp @@ -20,9 +20,7 @@ ============================================================================== */ -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { uint32_t Utils::getNumWordsForMessageType (uint32_t mt) @@ -55,5 +53,4 @@ uint32_t Utils::getNumWordsForMessageType (uint32_t mt) return 1; } -} -} +} // namespace juce::universal_midi_packets diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPUtils.h b/modules/juce_audio_basics/midi/ump/juce_UMPUtils.h index 53b097b99f..ad93823c71 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPUtils.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPUtils.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -114,7 +112,6 @@ struct Utils static constexpr uint8_t getChannel (uint32_t w) noexcept { return U4<3>::get (w); } }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPView.cpp b/modules/juce_audio_basics/midi/ump/juce_UMPView.cpp index 37dc324dc4..219e88a8b0 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPView.cpp +++ b/modules/juce_audio_basics/midi/ump/juce_UMPView.cpp @@ -20,9 +20,7 @@ ============================================================================== */ -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { uint32_t View::size() const noexcept @@ -31,5 +29,4 @@ uint32_t View::size() const noexcept return Utils::getNumWordsForMessageType (*ptr); } -} -} +} // namespace juce::universal_midi_packets diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPView.h b/modules/juce_audio_basics/midi/ump/juce_UMPView.h index 02bce2975d..9be4c258c4 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPView.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPView.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -86,7 +84,6 @@ private: const uint32_t* ptr = nullptr; }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMP_test.cpp b/modules/juce_audio_basics/midi/ump/juce_UMP_test.cpp index b34ed0fb03..355317e91e 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMP_test.cpp +++ b/modules/juce_audio_basics/midi/ump/juce_UMP_test.cpp @@ -20,9 +20,7 @@ ============================================================================== */ -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { constexpr uint8_t operator""_u8 (unsigned long long int i) { return static_cast (i); } @@ -1015,5 +1013,4 @@ private: static UniversalMidiPacketTests universalMidiPacketTests; -} -} +} // namespace juce::universal_midi_packets diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPacket.h b/modules/juce_audio_basics/midi/ump/juce_UMPacket.h index ef811510a1..197f0f7b1b 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPacket.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPacket.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -187,7 +185,6 @@ using PacketX2 = Packet<2>; using PacketX3 = Packet<3>; using PacketX4 = Packet<4>; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPackets.h b/modules/juce_audio_basics/midi/ump/juce_UMPackets.h index 14dcb44a6f..fba4966c79 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPackets.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPackets.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -90,7 +88,6 @@ private: std::vector storage; }; -} -} +} // namespace juce::universal_midi_packets #endif diff --git a/modules/juce_audio_devices/audio_io/juce_SampleRateHelpers.cpp b/modules/juce_audio_devices/audio_io/juce_SampleRateHelpers.cpp index aa2fe82668..4b1c1545e7 100644 --- a/modules/juce_audio_devices/audio_io/juce_SampleRateHelpers.cpp +++ b/modules/juce_audio_devices/audio_io/juce_SampleRateHelpers.cpp @@ -20,9 +20,7 @@ ============================================================================== */ -namespace juce -{ -namespace SampleRateHelpers +namespace juce::SampleRateHelpers { static inline const std::vector& getAllSampleRates() @@ -44,5 +42,4 @@ static inline const std::vector& getAllSampleRates() return sampleRates; } -} // namespace SampleRateHelpers -} // namespace juce +} // namespace juce::SampleRateHelpers diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h index 1cdad80c68..25122cc5ce 100644 --- a/modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPBytestreamInputHandler.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -138,7 +136,6 @@ struct BytestreamToUMPHandler : public BytestreamInputHandler BytestreamToUMPDispatcher dispatcher; }; -} -} +} // juce::universal_midi_packets #endif diff --git a/modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h b/modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h index 15ee58d3ad..d0d3798844 100644 --- a/modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h +++ b/modules/juce_audio_devices/midi_io/ump/juce_UMPU32InputHandler.h @@ -22,9 +22,7 @@ #ifndef DOXYGEN -namespace juce -{ -namespace universal_midi_packets +namespace juce::universal_midi_packets { /** @@ -149,7 +147,7 @@ struct U32ToUMPHandler : public U32InputHandler GenericUMPConverter converter; }; -} -} +} // namespace juce::universal_midi_packets + #endif diff --git a/modules/juce_audio_devices/native/juce_HighPerformanceAudioHelpers_android.h b/modules/juce_audio_devices/native/juce_HighPerformanceAudioHelpers_android.h index 7f93f9f7ea..cc78a30a4c 100644 --- a/modules/juce_audio_devices/native/juce_HighPerformanceAudioHelpers_android.h +++ b/modules/juce_audio_devices/native/juce_HighPerformanceAudioHelpers_android.h @@ -20,9 +20,6 @@ ============================================================================== */ -namespace juce -{ - //============================================================================== /** Some shared helpers methods for using the high-performance audio paths on @@ -30,7 +27,7 @@ namespace juce @tags{Audio} */ -namespace AndroidHighPerformanceAudioHelpers +namespace juce::AndroidHighPerformanceAudioHelpers { //============================================================================== static double getNativeSampleRate() @@ -126,6 +123,5 @@ namespace AndroidHighPerformanceAudioHelpers auto defaultBuffersToEnqueue = buffersToQueueForBufferDuration (nativeBufferSize, defaultBufferLength, currentSampleRate); return defaultBuffersToEnqueue * nativeBufferSize; } -} -} // namespace juce +} // namespace juce::AndroidHighPerformanceAudioHelpers diff --git a/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp b/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp index b7edd0e4e5..1d14380a41 100644 --- a/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp +++ b/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp @@ -2024,7 +2024,7 @@ struct MMDeviceMasterVolume JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MMDeviceMasterVolume) }; -} +} // namespace WasapiClasses //============================================================================== #define JUCE_SYSTEMAUDIOVOL_IMPLEMENTED 1 diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp index c548c014d3..18963c60e4 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp @@ -56,9 +56,7 @@ #error "You need to define the JucePlugin_LV2URI value! If you're using the Projucer/CMake, the definition will be written into JuceLV2Defines.h automatically." #endif -namespace juce -{ -namespace lv2_client +namespace juce::lv2_client { constexpr bool startsWithValidScheme (const std::string_view str) @@ -1829,7 +1827,6 @@ LV2_SYMBOL_EXPORT const LV2UI_Descriptor* lv2ui_descriptor (uint32_t index) return &descriptor; } -} -} +} // namespace juce::lv2_client #endif diff --git a/modules/juce_audio_processors/format_types/juce_LV2Common.h b/modules/juce_audio_processors/format_types/juce_LV2Common.h index 92a5a987a4..7180bbf358 100644 --- a/modules/juce_audio_processors/format_types/juce_LV2Common.h +++ b/modules/juce_audio_processors/format_types/juce_LV2Common.h @@ -74,9 +74,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE #include #include -namespace juce -{ -namespace lv2_shared +namespace juce::lv2_shared { class AtomForge @@ -664,7 +662,6 @@ static inline String sanitiseStringAsTtlName (const String& input) return String (CharPointer_UTF32 { sanitised.data() }, sanitised.size()); } -} -} +} // namespace juce::lv2_shared #endif diff --git a/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp index a3a0b22c9d..1680057304 100644 --- a/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp @@ -5175,7 +5175,7 @@ private: JUCE_LEAK_DETECTOR (LV2AudioPluginInstance) }; -} // namespace lv2 +} // namespace lv2_host //============================================================================== class LV2PluginFormat::Pimpl diff --git a/modules/juce_audio_processors/format_types/juce_LV2Resources.h b/modules/juce_audio_processors/format_types/juce_LV2Resources.h index 0ff36da91a..435aa2ae89 100644 --- a/modules/juce_audio_processors/format_types/juce_LV2Resources.h +++ b/modules/juce_audio_processors/format_types/juce_LV2Resources.h @@ -33,9 +33,7 @@ #include -namespace juce -{ -namespace lv2 +namespace juce::lv2 { struct BundleResource @@ -52,8 +50,7 @@ struct Bundle static std::vector getAllBundles(); }; -} -} +} // namespace juce::lv2 std::vector juce::lv2::Bundle::getAllBundles() { diff --git a/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h b/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h index dcf0ff8f6b..f320ac4afb 100644 --- a/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h +++ b/modules/juce_audio_processors/utilities/juce_ExtensionsVisitor.h @@ -26,13 +26,10 @@ #ifndef DOXYGEN // Forward declarations to avoid leaking implementation details. -namespace Steinberg +namespace Steinberg::Vst { - namespace Vst - { - class IComponent; - } -} // namespace Steinberg + class IComponent; +} // namespace Steinberg::Vst #endif diff --git a/modules/juce_core/containers/juce_FixedSizeFunction_test.cpp b/modules/juce_core/containers/juce_FixedSizeFunction_test.cpp index 86d9b3bb41..23d1484b2d 100644 --- a/modules/juce_core/containers/juce_FixedSizeFunction_test.cpp +++ b/modules/juce_core/containers/juce_FixedSizeFunction_test.cpp @@ -360,5 +360,5 @@ public: FixedSizeFunctionTest fixedSizedFunctionTest; } -} +} // namespace juce #undef JUCE_FAIL_ON_ALLOCATION_IN_SCOPE diff --git a/modules/juce_core/unit_tests/juce_UnitTestCategories.h b/modules/juce_core/unit_tests/juce_UnitTestCategories.h index 267991f486..b68bbd235b 100644 --- a/modules/juce_core/unit_tests/juce_UnitTestCategories.h +++ b/modules/juce_core/unit_tests/juce_UnitTestCategories.h @@ -20,11 +20,9 @@ ============================================================================== */ -namespace juce +namespace juce::UnitTestCategories { -namespace UnitTestCategories -{ static const String analytics { "Analytics" }; static const String audio { "Audio" }; static const String audioProcessorParameters { "AudioProcessorParameters" }; @@ -50,6 +48,5 @@ namespace UnitTestCategories static const String time { "Time" }; static const String values { "Values" }; static const String xml { "XML" }; -} -} // namespace juce +} // namespace juce::UnitTestCategories diff --git a/modules/juce_dsp/containers/juce_AudioBlock.h b/modules/juce_dsp/containers/juce_AudioBlock.h index 2ccf95dbd0..c1b23d43e7 100644 --- a/modules/juce_dsp/containers/juce_AudioBlock.h +++ b/modules/juce_dsp/containers/juce_AudioBlock.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { #ifndef DOXYGEN @@ -891,5 +889,4 @@ private: friend class AudioBlock; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/containers/juce_AudioBlock_test.cpp b/modules/juce_dsp/containers/juce_AudioBlock_test.cpp index 4b091bf34b..f02e6eeef5 100644 --- a/modules/juce_dsp/containers/juce_AudioBlock_test.cpp +++ b/modules/juce_dsp/containers/juce_AudioBlock_test.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { #if JUCE_USE_SIMD @@ -496,5 +494,4 @@ static AudioBlockUnitTests> audioBlockSIMDFloatUnitTests; static AudioBlockUnitTests> audioBlockSIMDDoubleUnitTests; #endif -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/containers/juce_SIMDRegister.h b/modules/juce_dsp/containers/juce_SIMDRegister.h index 04449a7906..705214de46 100644 --- a/modules/juce_dsp/containers/juce_SIMDRegister.h +++ b/modules/juce_dsp/containers/juce_SIMDRegister.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { #ifndef DOXYGEN @@ -392,9 +390,4 @@ private: } }; -} // namespace dsp -} // namespace juce - -#ifndef DOXYGEN - #include "juce_SIMDRegister_Impl.h" -#endif +} // namespace juce::dsp diff --git a/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp b/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp index c533b70861..ebd125d9bf 100644 --- a/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp +++ b/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { namespace SIMDRegister_test_internal @@ -876,5 +874,4 @@ public: static SIMDRegisterUnitTests SIMDRegisterUnitTests; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/filter_design/juce_FilterDesign.cpp b/modules/juce_dsp/filter_design/juce_FilterDesign.cpp index e0280be8c2..79c262e927 100644 --- a/modules/juce_dsp/filter_design/juce_FilterDesign.cpp +++ b/modules/juce_dsp/filter_design/juce_FilterDesign.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { template @@ -697,5 +695,4 @@ typename FilterDesign::IIRPolyphaseAllpassStructure template struct FilterDesign; template struct FilterDesign; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/filter_design/juce_FilterDesign.h b/modules/juce_dsp/filter_design/juce_FilterDesign.h index cd2719aa47..35d127de25 100644 --- a/modules/juce_dsp/filter_design/juce_FilterDesign.h +++ b/modules/juce_dsp/filter_design/juce_FilterDesign.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -295,5 +293,4 @@ private: FilterDesign() = delete; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/frequency/juce_Convolution.cpp b/modules/juce_dsp/frequency/juce_Convolution.cpp index ef44a2cec9..b23fc6c418 100644 --- a/modules/juce_dsp/frequency/juce_Convolution.cpp +++ b/modules/juce_dsp/frequency/juce_Convolution.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { template @@ -1293,5 +1291,4 @@ int Convolution::getCurrentIRSize() const { return pimpl->getCurrentIRSize(); } int Convolution::getLatency() const { return pimpl->getLatency(); } -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/frequency/juce_Convolution.h b/modules/juce_dsp/frequency/juce_Convolution.h index 19c44f575e..d12db50b53 100644 --- a/modules/juce_dsp/frequency/juce_Convolution.h +++ b/modules/juce_dsp/frequency/juce_Convolution.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -306,5 +304,4 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Convolution) }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/frequency/juce_Convolution_test.cpp b/modules/juce_dsp/frequency/juce_Convolution_test.cpp index e705f9d15f..dbbf607c13 100644 --- a/modules/juce_dsp/frequency/juce_Convolution_test.cpp +++ b/modules/juce_dsp/frequency/juce_Convolution_test.cpp @@ -29,9 +29,7 @@ #define JUCE_FAIL_ON_ALLOCATION_IN_SCOPE #endif -namespace juce -{ -namespace dsp +namespace juce::dsp { namespace { @@ -575,7 +573,6 @@ public: ConvolutionTest convolutionUnitTest; } -} -} +} // namespace juce::dsp #undef JUCE_FAIL_ON_ALLOCATION_IN_SCOPE diff --git a/modules/juce_dsp/frequency/juce_FFT.cpp b/modules/juce_dsp/frequency/juce_FFT.cpp index 3f0ef5b702..3bf5bda5ab 100644 --- a/modules/juce_dsp/frequency/juce_FFT.cpp +++ b/modules/juce_dsp/frequency/juce_FFT.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { struct FFT::Instance @@ -997,5 +995,4 @@ void FFT::performFrequencyOnlyForwardTransform (float* inputOutputData, bool ign zeromem (inputOutputData + limit, static_cast (size * 2 - limit) * sizeof (float)); } -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/frequency/juce_FFT.h b/modules/juce_dsp/frequency/juce_FFT.h index b0e03406f9..fd897ca698 100644 --- a/modules/juce_dsp/frequency/juce_FFT.h +++ b/modules/juce_dsp/frequency/juce_FFT.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -128,5 +126,4 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FFT) }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/frequency/juce_FFT_test.cpp b/modules/juce_dsp/frequency/juce_FFT_test.cpp index 0a240e116c..36d025c1dc 100644 --- a/modules/juce_dsp/frequency/juce_FFT_test.cpp +++ b/modules/juce_dsp/frequency/juce_FFT_test.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { struct FFTUnitTest : public UnitTest @@ -214,5 +212,4 @@ struct FFTUnitTest : public UnitTest static FFTUnitTest fftUnitTest; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/frequency/juce_Windowing.cpp b/modules/juce_dsp/frequency/juce_Windowing.cpp index e8f561195a..78afebecf3 100644 --- a/modules/juce_dsp/frequency/juce_Windowing.cpp +++ b/modules/juce_dsp/frequency/juce_Windowing.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { template @@ -192,5 +190,4 @@ const char* WindowingFunction::getWindowingMethodName (WindowingMetho template class WindowingFunction; template class WindowingFunction; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/frequency/juce_Windowing.h b/modules/juce_dsp/frequency/juce_Windowing.h index 573e89bbf4..9e4a41b049 100644 --- a/modules/juce_dsp/frequency/juce_Windowing.h +++ b/modules/juce_dsp/frequency/juce_Windowing.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -107,5 +105,4 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowingFunction) }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/juce_dsp.cpp b/modules/juce_dsp/juce_dsp.cpp index 235b81c6f9..e34bfe56a7 100644 --- a/modules/juce_dsp/juce_dsp.cpp +++ b/modules/juce_dsp/juce_dsp.cpp @@ -56,7 +56,6 @@ #include "processors/juce_FIRFilter.cpp" #include "processors/juce_IIRFilter.cpp" -#include "processors/juce_IIRFilter_Impl.h" #include "processors/juce_FirstOrderTPTFilter.cpp" #include "processors/juce_Panner.cpp" #include "processors/juce_Oversampling.cpp" diff --git a/modules/juce_dsp/juce_dsp.h b/modules/juce_dsp/juce_dsp.h index 86b9d5a14d..cfa51e1a6b 100644 --- a/modules/juce_dsp/juce_dsp.h +++ b/modules/juce_dsp/juce_dsp.h @@ -188,37 +188,36 @@ #undef Factor #undef check -namespace juce +namespace juce::dsp { - namespace dsp - { - template - using Complex = std::complex; - - template - using FixedSizeFunction = juce::FixedSizeFunction; - - //============================================================================== - namespace util - { - /** Use this function to prevent denormals on intel CPUs. - This function will work with both primitives and simple containers. - */ - #if JUCE_DSP_ENABLE_SNAP_TO_ZERO - inline void snapToZero (float& x) noexcept { JUCE_SNAP_TO_ZERO (x); } - #ifndef DOXYGEN - inline void snapToZero (double& x) noexcept { JUCE_SNAP_TO_ZERO (x); } - inline void snapToZero (long double& x) noexcept { JUCE_SNAP_TO_ZERO (x); } - #endif - #else - inline void snapToZero ([[maybe_unused]] float& x) noexcept {} - #ifndef DOXYGEN - inline void snapToZero ([[maybe_unused]] double& x) noexcept {} - inline void snapToZero ([[maybe_unused]] long double& x) noexcept {} - #endif - #endif - } - } + +template +using Complex = std::complex; + +template +using FixedSizeFunction = juce::FixedSizeFunction; + +//============================================================================== +namespace util +{ + /** Use this function to prevent denormals on intel CPUs. + This function will work with both primitives and simple containers. + */ + #if JUCE_DSP_ENABLE_SNAP_TO_ZERO + inline void snapToZero (float& x) noexcept { JUCE_SNAP_TO_ZERO (x); } + #ifndef DOXYGEN + inline void snapToZero (double& x) noexcept { JUCE_SNAP_TO_ZERO (x); } + inline void snapToZero (long double& x) noexcept { JUCE_SNAP_TO_ZERO (x); } + #endif + #else + inline void snapToZero ([[maybe_unused]] float& x) noexcept {} + #ifndef DOXYGEN + inline void snapToZero ([[maybe_unused]] double& x) noexcept {} + inline void snapToZero ([[maybe_unused]] long double& x) noexcept {} + #endif + #endif +} + } //============================================================================== @@ -255,6 +254,7 @@ namespace juce #include "processors/juce_ProcessorChain.h" #include "processors/juce_ProcessorDuplicator.h" #include "processors/juce_IIRFilter.h" +#include "processors/juce_IIRFilter_Impl.h" #include "processors/juce_FIRFilter.h" #include "processors/juce_StateVariableFilter.h" #include "processors/juce_FirstOrderTPTFilter.h" diff --git a/modules/juce_dsp/maths/juce_FastMathApproximations.h b/modules/juce_dsp/maths/juce_FastMathApproximations.h index 03882441f9..b9b570d564 100644 --- a/modules/juce_dsp/maths/juce_FastMathApproximations.h +++ b/modules/juce_dsp/maths/juce_FastMathApproximations.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -260,5 +258,4 @@ struct FastMathApproximations } }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/maths/juce_LogRampedValue.h b/modules/juce_dsp/maths/juce_LogRampedValue.h index 821e07e2ee..a714c3a855 100644 --- a/modules/juce_dsp/maths/juce_LogRampedValue.h +++ b/modules/juce_dsp/maths/juce_LogRampedValue.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -185,5 +183,4 @@ private: FloatType temp = 0, source = 0, r = 0, d = 1; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/maths/juce_LogRampedValue_test.cpp b/modules/juce_dsp/maths/juce_LogRampedValue_test.cpp index 4c729c361c..a003413c38 100644 --- a/modules/juce_dsp/maths/juce_LogRampedValue_test.cpp +++ b/modules/juce_dsp/maths/juce_LogRampedValue_test.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { static CommonSmoothedValueTests > commonLogRampedValueTests; @@ -92,5 +90,4 @@ public: static LogRampedValueTests LogRampedValueTests; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/maths/juce_LookupTable.cpp b/modules/juce_dsp/maths/juce_LookupTable.cpp index 5e8f729cb6..8e96cbb4df 100644 --- a/modules/juce_dsp/maths/juce_LookupTable.cpp +++ b/modules/juce_dsp/maths/juce_LookupTable.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { template @@ -152,5 +150,4 @@ template class LookupTable; template class LookupTableTransform; template class LookupTableTransform; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/maths/juce_LookupTable.h b/modules/juce_dsp/maths/juce_LookupTable.h index 77987cb69e..d4b455b1fd 100644 --- a/modules/juce_dsp/maths/juce_LookupTable.h +++ b/modules/juce_dsp/maths/juce_LookupTable.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -326,5 +324,4 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookupTableTransform) }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/maths/juce_Matrix.cpp b/modules/juce_dsp/maths/juce_Matrix.cpp index a0b20cb48f..8d22df7667 100644 --- a/modules/juce_dsp/maths/juce_Matrix.cpp +++ b/modules/juce_dsp/maths/juce_Matrix.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { template @@ -313,5 +311,4 @@ String Matrix::toString() const template class Matrix; template class Matrix; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/maths/juce_Matrix.h b/modules/juce_dsp/maths/juce_Matrix.h index c3345cf4cc..39d3656738 100644 --- a/modules/juce_dsp/maths/juce_Matrix.h +++ b/modules/juce_dsp/maths/juce_Matrix.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -250,5 +248,4 @@ private: JUCE_LEAK_DETECTOR (Matrix) }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/maths/juce_Matrix_test.cpp b/modules/juce_dsp/maths/juce_Matrix_test.cpp index 21eae4564a..f13d93a250 100644 --- a/modules/juce_dsp/maths/juce_Matrix_test.cpp +++ b/modules/juce_dsp/maths/juce_Matrix_test.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { struct LinearAlgebraUnitTest : public UnitTest @@ -169,5 +167,4 @@ struct LinearAlgebraUnitTest : public UnitTest static LinearAlgebraUnitTest linearAlgebraUnitTest; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/maths/juce_Phase.h b/modules/juce_dsp/maths/juce_Phase.h index 7cf296ccdd..45a2a97e0e 100644 --- a/modules/juce_dsp/maths/juce_Phase.h +++ b/modules/juce_dsp/maths/juce_Phase.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -63,5 +61,4 @@ struct Phase Type phase = 0; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/maths/juce_Polynomial.h b/modules/juce_dsp/maths/juce_Polynomial.h index 34868ee327..47e9bf58fa 100644 --- a/modules/juce_dsp/maths/juce_Polynomial.h +++ b/modules/juce_dsp/maths/juce_Polynomial.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -164,5 +162,4 @@ private: JUCE_LEAK_DETECTOR (Polynomial) }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/maths/juce_SpecialFunctions.cpp b/modules/juce_dsp/maths/juce_SpecialFunctions.cpp index 36a97920b2..dc1f2e06bc 100644 --- a/modules/juce_dsp/maths/juce_SpecialFunctions.cpp +++ b/modules/juce_dsp/maths/juce_SpecialFunctions.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { double SpecialFunctions::besselI0 (double x) noexcept @@ -139,5 +137,4 @@ Complex SpecialFunctions::asne (Complex w, double k) noexcept return 2.0 / MathConstants::pi * std::asin (last); } -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/maths/juce_SpecialFunctions.h b/modules/juce_dsp/maths/juce_SpecialFunctions.h index d9a57639f4..8fbd459f83 100644 --- a/modules/juce_dsp/maths/juce_SpecialFunctions.h +++ b/modules/juce_dsp/maths/juce_SpecialFunctions.h @@ -23,11 +23,8 @@ ============================================================================== */ -namespace juce +namespace juce::dsp { -namespace dsp -{ - /** Contains miscellaneous filter design and windowing functions. @@ -63,5 +60,4 @@ struct SpecialFunctions static Complex asne (Complex w, double k) noexcept; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_avx.cpp b/modules/juce_dsp/native/juce_SIMDNativeOps_avx.cpp index c335d9127f..4419b84930 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_avx.cpp +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_avx.cpp @@ -23,36 +23,33 @@ ============================================================================== */ -namespace juce +namespace juce::dsp { - namespace dsp - { - DEFINE_AVX_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; - DEFINE_AVX_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast (0x80000000), 0, static_cast (0x80000000), 0, static_cast (0x80000000), 0, static_cast (0x80000000), 0 }; - DEFINE_AVX_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f }; + DEFINE_AVX_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; + DEFINE_AVX_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast (0x80000000), 0, static_cast (0x80000000), 0, static_cast (0x80000000), 0, static_cast (0x80000000), 0 }; + DEFINE_AVX_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f }; - DEFINE_AVX_SIMD_CONST (int64_t, double, kAllBitsSet) = { -1, -1, -1, -1 }; - DEFINE_AVX_SIMD_CONST (int64_t, double, kEvenHighBit) = { static_cast (0x8000000000000000), 0, static_cast (0x8000000000000000), 0 }; - DEFINE_AVX_SIMD_CONST (double, double, kOne) = { 1.0, 1.0, 1.0, 1.0 }; + DEFINE_AVX_SIMD_CONST (int64_t, double, kAllBitsSet) = { -1, -1, -1, -1 }; + DEFINE_AVX_SIMD_CONST (int64_t, double, kEvenHighBit) = { static_cast (0x8000000000000000), 0, static_cast (0x8000000000000000), 0 }; + DEFINE_AVX_SIMD_CONST (double, double, kOne) = { 1.0, 1.0, 1.0, 1.0 }; - DEFINE_AVX_SIMD_CONST (int8_t, int8_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + DEFINE_AVX_SIMD_CONST (int8_t, int8_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; - DEFINE_AVX_SIMD_CONST (uint8_t, uint8_t, kAllBitsSet) = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; - DEFINE_AVX_SIMD_CONST (uint8_t, uint8_t, kHighBit) = { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; + DEFINE_AVX_SIMD_CONST (uint8_t, uint8_t, kAllBitsSet) = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + DEFINE_AVX_SIMD_CONST (uint8_t, uint8_t, kHighBit) = { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; - DEFINE_AVX_SIMD_CONST (int16_t, int16_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + DEFINE_AVX_SIMD_CONST (int16_t, int16_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; - DEFINE_AVX_SIMD_CONST (uint16_t, uint16_t, kAllBitsSet) = { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; - DEFINE_AVX_SIMD_CONST (uint16_t, uint16_t, kHighBit) = { 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000 }; + DEFINE_AVX_SIMD_CONST (uint16_t, uint16_t, kAllBitsSet) = { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; + DEFINE_AVX_SIMD_CONST (uint16_t, uint16_t, kHighBit) = { 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000 }; - DEFINE_AVX_SIMD_CONST (int32_t, int32_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; + DEFINE_AVX_SIMD_CONST (int32_t, int32_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; - DEFINE_AVX_SIMD_CONST (uint32_t, uint32_t, kAllBitsSet) = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; - DEFINE_AVX_SIMD_CONST (uint32_t, uint32_t, kHighBit) = { 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000 }; + DEFINE_AVX_SIMD_CONST (uint32_t, uint32_t, kAllBitsSet) = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; + DEFINE_AVX_SIMD_CONST (uint32_t, uint32_t, kHighBit) = { 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000 }; - DEFINE_AVX_SIMD_CONST (int64_t, int64_t, kAllBitsSet) = { -1LL, -1LL, -1LL, -1LL }; + DEFINE_AVX_SIMD_CONST (int64_t, int64_t, kAllBitsSet) = { -1LL, -1LL, -1LL, -1LL }; - DEFINE_AVX_SIMD_CONST (uint64_t, uint64_t, kAllBitsSet) = { 0xffffffffffffffffULL, 0xffffffffffffffffULL, 0xffffffffffffffffULL, 0xffffffffffffffffULL }; - DEFINE_AVX_SIMD_CONST (uint64_t, uint64_t, kHighBit) = { 0x8000000000000000ULL, 0x8000000000000000ULL, 0x8000000000000000ULL, 0x8000000000000000ULL }; - } + DEFINE_AVX_SIMD_CONST (uint64_t, uint64_t, kAllBitsSet) = { 0xffffffffffffffffULL, 0xffffffffffffffffULL, 0xffffffffffffffffULL, 0xffffffffffffffffULL }; + DEFINE_AVX_SIMD_CONST (uint64_t, uint64_t, kHighBit) = { 0x8000000000000000ULL, 0x8000000000000000ULL, 0x8000000000000000ULL, 0x8000000000000000ULL }; } diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_avx.h b/modules/juce_dsp/native/juce_SIMDNativeOps_avx.h index c411a4c33d..113be7c627 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_avx.h +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_avx.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { #ifndef DOXYGEN @@ -657,5 +655,4 @@ struct SIMDNativeOps JUCE_END_IGNORE_WARNINGS_GCC_LIKE -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_fallback.h b/modules/juce_dsp/native/juce_SIMDNativeOps_fallback.h index 22d1917a62..b7214eeece 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_fallback.h +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_fallback.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** A template specialisation to find corresponding mask type for primitives. */ @@ -263,5 +261,4 @@ struct SIMDFallbackOps } }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_neon.cpp b/modules/juce_dsp/native/juce_SIMDNativeOps_neon.cpp index adb991de6e..c94032029d 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_neon.cpp +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_neon.cpp @@ -23,26 +23,23 @@ ============================================================================== */ -namespace juce +namespace juce::dsp { - namespace dsp - { - DEFINE_NEON_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1 }; - DEFINE_NEON_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast (0x80000000), 0, static_cast (0x80000000), 0 }; - DEFINE_NEON_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f }; - - #if JUCE_64BIT - DEFINE_NEON_SIMD_CONST (int64_t, double, kAllBitsSet) = { -1, -1 }; - DEFINE_NEON_SIMD_CONST (double, double, kOne) = { 1.0, 1.0 }; - #endif - - DEFINE_NEON_SIMD_CONST (int8_t, int8_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; - DEFINE_NEON_SIMD_CONST (uint8_t, uint8_t, kAllBitsSet) = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; - DEFINE_NEON_SIMD_CONST (int16_t, int16_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; - DEFINE_NEON_SIMD_CONST (uint16_t, uint16_t, kAllBitsSet) = { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; - DEFINE_NEON_SIMD_CONST (int32_t, int32_t, kAllBitsSet) = { -1, -1, -1, -1 }; - DEFINE_NEON_SIMD_CONST (uint32_t, uint32_t, kAllBitsSet) = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; - DEFINE_NEON_SIMD_CONST (int64_t, int64_t, kAllBitsSet) = { -1, -1 }; - DEFINE_NEON_SIMD_CONST (uint64_t, uint64_t, kAllBitsSet) = { 0xffffffffffffffff, 0xffffffffffffffff }; - } + DEFINE_NEON_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1 }; + DEFINE_NEON_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast (0x80000000), 0, static_cast (0x80000000), 0 }; + DEFINE_NEON_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f }; + + #if JUCE_64BIT + DEFINE_NEON_SIMD_CONST (int64_t, double, kAllBitsSet) = { -1, -1 }; + DEFINE_NEON_SIMD_CONST (double, double, kOne) = { 1.0, 1.0 }; + #endif + + DEFINE_NEON_SIMD_CONST (int8_t, int8_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + DEFINE_NEON_SIMD_CONST (uint8_t, uint8_t, kAllBitsSet) = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + DEFINE_NEON_SIMD_CONST (int16_t, int16_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; + DEFINE_NEON_SIMD_CONST (uint16_t, uint16_t, kAllBitsSet) = { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; + DEFINE_NEON_SIMD_CONST (int32_t, int32_t, kAllBitsSet) = { -1, -1, -1, -1 }; + DEFINE_NEON_SIMD_CONST (uint32_t, uint32_t, kAllBitsSet) = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; + DEFINE_NEON_SIMD_CONST (int64_t, int64_t, kAllBitsSet) = { -1, -1 }; + DEFINE_NEON_SIMD_CONST (uint64_t, uint64_t, kAllBitsSet) = { 0xffffffffffffffff, 0xffffffffffffffff }; } diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_neon.h b/modules/juce_dsp/native/juce_SIMDNativeOps_neon.h index 63341530a5..e6e382cf8e 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_neon.h +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_neon.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { #ifndef DOXYGEN @@ -538,5 +536,4 @@ struct SIMDNativeOps JUCE_END_IGNORE_WARNINGS_GCC_LIKE -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_sse.cpp b/modules/juce_dsp/native/juce_SIMDNativeOps_sse.cpp index 5e48bd2dda..3a2b26ddc8 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_sse.cpp +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_sse.cpp @@ -23,36 +23,33 @@ ============================================================================== */ -namespace juce +namespace juce::dsp { - namespace dsp - { - DEFINE_SSE_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1 }; - DEFINE_SSE_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast (0x80000000), 0, static_cast (0x80000000), 0 }; - DEFINE_SSE_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f }; + DEFINE_SSE_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1 }; + DEFINE_SSE_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast (0x80000000), 0, static_cast (0x80000000), 0 }; + DEFINE_SSE_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f }; - DEFINE_SSE_SIMD_CONST (int64_t, double, kAllBitsSet) = { -1LL, -1LL }; - DEFINE_SSE_SIMD_CONST (int64_t, double, kEvenHighBit) = { static_cast (0x8000000000000000), 0 }; - DEFINE_SSE_SIMD_CONST (double, double, kOne) = { 1.0, 1.0 }; + DEFINE_SSE_SIMD_CONST (int64_t, double, kAllBitsSet) = { -1LL, -1LL }; + DEFINE_SSE_SIMD_CONST (int64_t, double, kEvenHighBit) = { static_cast (0x8000000000000000), 0 }; + DEFINE_SSE_SIMD_CONST (double, double, kOne) = { 1.0, 1.0 }; - DEFINE_SSE_SIMD_CONST (int8_t, int8_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + DEFINE_SSE_SIMD_CONST (int8_t, int8_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; - DEFINE_SSE_SIMD_CONST (uint8_t, uint8_t, kAllBitsSet) = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; - DEFINE_SSE_SIMD_CONST (uint8_t, uint8_t, kHighBit) = { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; + DEFINE_SSE_SIMD_CONST (uint8_t, uint8_t, kAllBitsSet) = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + DEFINE_SSE_SIMD_CONST (uint8_t, uint8_t, kHighBit) = { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; - DEFINE_SSE_SIMD_CONST (int16_t, int16_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; + DEFINE_SSE_SIMD_CONST (int16_t, int16_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; - DEFINE_SSE_SIMD_CONST (uint16_t, uint16_t, kAllBitsSet) = { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; - DEFINE_SSE_SIMD_CONST (uint16_t, uint16_t, kHighBit) = { 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000 }; + DEFINE_SSE_SIMD_CONST (uint16_t, uint16_t, kAllBitsSet) = { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; + DEFINE_SSE_SIMD_CONST (uint16_t, uint16_t, kHighBit) = { 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000 }; - DEFINE_SSE_SIMD_CONST (int32_t, int32_t, kAllBitsSet) = { -1, -1, -1, -1 }; + DEFINE_SSE_SIMD_CONST (int32_t, int32_t, kAllBitsSet) = { -1, -1, -1, -1 }; - DEFINE_SSE_SIMD_CONST (uint32_t, uint32_t, kAllBitsSet) = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; - DEFINE_SSE_SIMD_CONST (uint32_t, uint32_t, kHighBit) = { 0x80000000, 0x80000000, 0x80000000, 0x80000000 }; + DEFINE_SSE_SIMD_CONST (uint32_t, uint32_t, kAllBitsSet) = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; + DEFINE_SSE_SIMD_CONST (uint32_t, uint32_t, kHighBit) = { 0x80000000, 0x80000000, 0x80000000, 0x80000000 }; - DEFINE_SSE_SIMD_CONST (int64_t, int64_t, kAllBitsSet) = { -1, -1 }; + DEFINE_SSE_SIMD_CONST (int64_t, int64_t, kAllBitsSet) = { -1, -1 }; - DEFINE_SSE_SIMD_CONST (uint64_t, uint64_t, kAllBitsSet) = { 0xffffffffffffffff, 0xffffffffffffffff }; - DEFINE_SSE_SIMD_CONST (uint64_t, uint64_t, kHighBit) = { 0x8000000000000000, 0x8000000000000000 }; - } + DEFINE_SSE_SIMD_CONST (uint64_t, uint64_t, kAllBitsSet) = { 0xffffffffffffffff, 0xffffffffffffffff }; + DEFINE_SSE_SIMD_CONST (uint64_t, uint64_t, kHighBit) = { 0x8000000000000000, 0x8000000000000000 }; } diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_sse.h b/modules/juce_dsp/native/juce_SIMDNativeOps_sse.h index eb9fefd3b4..51b93926f0 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_sse.h +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_sse.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { #ifndef DOXYGEN @@ -727,5 +725,4 @@ struct SIMDNativeOps JUCE_END_IGNORE_WARNINGS_GCC_LIKE -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_BallisticsFilter.cpp b/modules/juce_dsp/processors/juce_BallisticsFilter.cpp index c999a76437..a6e43fb3e0 100644 --- a/modules/juce_dsp/processors/juce_BallisticsFilter.cpp +++ b/modules/juce_dsp/processors/juce_BallisticsFilter.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -126,5 +124,4 @@ SampleType BallisticsFilter::calculateLimitedCte (SampleType timeMs) template class BallisticsFilter; template class BallisticsFilter; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_BallisticsFilter.h b/modules/juce_dsp/processors/juce_BallisticsFilter.h index e1a7957561..7cc09e65b4 100644 --- a/modules/juce_dsp/processors/juce_BallisticsFilter.h +++ b/modules/juce_dsp/processors/juce_BallisticsFilter.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { enum class BallisticsFilterLevelCalculationType @@ -146,5 +144,4 @@ private: LevelCalculationType levelType = LevelCalculationType::peak; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_DelayLine.cpp b/modules/juce_dsp/processors/juce_DelayLine.cpp index c9ecc9e9cd..e801f17228 100644 --- a/modules/juce_dsp/processors/juce_DelayLine.cpp +++ b/modules/juce_dsp/processors/juce_DelayLine.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -134,5 +132,4 @@ template class DelayLine; template class DelayLine; template class DelayLine; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_DelayLine.h b/modules/juce_dsp/processors/juce_DelayLine.h index 29c53d28e8..8e365bd99b 100644 --- a/modules/juce_dsp/processors/juce_DelayLine.h +++ b/modules/juce_dsp/processors/juce_DelayLine.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -313,5 +311,4 @@ private: SampleType alpha = 0.0; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_DryWetMixer.cpp b/modules/juce_dsp/processors/juce_DryWetMixer.cpp index 03a68a764a..d87a5d2af5 100644 --- a/modules/juce_dsp/processors/juce_DryWetMixer.cpp +++ b/modules/juce_dsp/processors/juce_DryWetMixer.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -367,5 +365,4 @@ static const DryWetMixerTests dryWetMixerTests; #endif -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_DryWetMixer.h b/modules/juce_dsp/processors/juce_DryWetMixer.h index 6023f7c172..612dd6986a 100644 --- a/modules/juce_dsp/processors/juce_DryWetMixer.h +++ b/modules/juce_dsp/processors/juce_DryWetMixer.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { enum class DryWetMixingRule @@ -116,5 +114,4 @@ private: int maximumWetLatencyInSamples = 0; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_FIRFilter.cpp b/modules/juce_dsp/processors/juce_FIRFilter.cpp index 4ebff528aa..d53079e1cd 100644 --- a/modules/juce_dsp/processors/juce_FIRFilter.cpp +++ b/modules/juce_dsp/processors/juce_FIRFilter.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { template @@ -157,5 +155,4 @@ void FIR::Coefficients::Coefficients::normalise() noexcept template struct FIR::Coefficients; template struct FIR::Coefficients; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_FIRFilter.h b/modules/juce_dsp/processors/juce_FIRFilter.h index 7485e87eda..1bdf46d598 100644 --- a/modules/juce_dsp/processors/juce_FIRFilter.h +++ b/modules/juce_dsp/processors/juce_FIRFilter.h @@ -23,15 +23,10 @@ ============================================================================== */ -namespace juce -{ -namespace dsp -{ - /** Classes for FIR filter processing. */ -namespace FIR +namespace juce::dsp::FIR { template struct Coefficients; @@ -279,7 +274,5 @@ namespace FIR */ Array coefficients; }; -} -} // namespace dsp -} // namespace juce +} // namespace juce::dsp::FIR diff --git a/modules/juce_dsp/processors/juce_FIRFilter_test.cpp b/modules/juce_dsp/processors/juce_FIRFilter_test.cpp index 466ed9426d..0f264de307 100644 --- a/modules/juce_dsp/processors/juce_FIRFilter_test.cpp +++ b/modules/juce_dsp/processors/juce_FIRFilter_test.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { class FIRFilterTest : public UnitTest @@ -218,5 +216,4 @@ public: static FIRFilterTest firFilterUnitTest; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_FirstOrderTPTFilter.cpp b/modules/juce_dsp/processors/juce_FirstOrderTPTFilter.cpp index 2b145dd5b9..62f4806c9d 100644 --- a/modules/juce_dsp/processors/juce_FirstOrderTPTFilter.cpp +++ b/modules/juce_dsp/processors/juce_FirstOrderTPTFilter.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -118,5 +116,4 @@ void FirstOrderTPTFilter::update() template class FirstOrderTPTFilter; template class FirstOrderTPTFilter; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_FirstOrderTPTFilter.h b/modules/juce_dsp/processors/juce_FirstOrderTPTFilter.h index 7e24fd8bb6..686e26a5ac 100644 --- a/modules/juce_dsp/processors/juce_FirstOrderTPTFilter.h +++ b/modules/juce_dsp/processors/juce_FirstOrderTPTFilter.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { enum class FirstOrderTPTFilterType @@ -147,5 +145,4 @@ private: SampleType cutoffFrequency = 1000.0; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_IIRFilter.cpp b/modules/juce_dsp/processors/juce_IIRFilter.cpp index 80a1052957..64b9e41a2b 100644 --- a/modules/juce_dsp/processors/juce_IIRFilter.cpp +++ b/modules/juce_dsp/processors/juce_IIRFilter.cpp @@ -23,11 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp -{ -namespace IIR +namespace juce::dsp::IIR { constexpr auto minimumDecibels = -300.0; @@ -574,6 +570,4 @@ void Coefficients::getPhaseForFrequencyArray (double* frequencies, template struct Coefficients; template struct Coefficients; -} // namespace IIR -} // namespace dsp -} // namespace juce +} // namespace juce::dsp::IIR diff --git a/modules/juce_dsp/processors/juce_IIRFilter.h b/modules/juce_dsp/processors/juce_IIRFilter.h index 48d54c48a8..422759f7d4 100644 --- a/modules/juce_dsp/processors/juce_IIRFilter.h +++ b/modules/juce_dsp/processors/juce_IIRFilter.h @@ -23,15 +23,10 @@ ============================================================================== */ -namespace juce -{ -namespace dsp -{ - /** Classes for IIR filter processing. */ -namespace IIR +namespace juce::dsp::IIR { /** A set of coefficients for use in an Filter object. @@ -396,8 +391,4 @@ namespace IIR JUCE_LEAK_DETECTOR (Filter) }; -} // namespace IIR -} // namespace dsp -} // namespace juce - -#include "juce_IIRFilter_Impl.h" +} // namespace juce::dsp::IIR diff --git a/modules/juce_dsp/processors/juce_IIRFilter_Impl.h b/modules/juce_dsp/processors/juce_IIRFilter_Impl.h index b30caf7cd7..70d6802ea8 100644 --- a/modules/juce_dsp/processors/juce_IIRFilter_Impl.h +++ b/modules/juce_dsp/processors/juce_IIRFilter_Impl.h @@ -23,11 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp -{ -namespace IIR +namespace juce::dsp::IIR { #ifndef DOXYGEN @@ -241,6 +237,4 @@ void Filter::check() #endif -} // namespace IIR -} // namespace dsp -} // namespace juce +} // namespace juce::dsp::IIR diff --git a/modules/juce_dsp/processors/juce_LinkwitzRileyFilter.cpp b/modules/juce_dsp/processors/juce_LinkwitzRileyFilter.cpp index 8d41ca44a8..be4ed0cf52 100644 --- a/modules/juce_dsp/processors/juce_LinkwitzRileyFilter.cpp +++ b/modules/juce_dsp/processors/juce_LinkwitzRileyFilter.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -145,5 +143,4 @@ void LinkwitzRileyFilter::update() template class LinkwitzRileyFilter; template class LinkwitzRileyFilter; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_LinkwitzRileyFilter.h b/modules/juce_dsp/processors/juce_LinkwitzRileyFilter.h index 4661762bf9..ad731df7a1 100644 --- a/modules/juce_dsp/processors/juce_LinkwitzRileyFilter.h +++ b/modules/juce_dsp/processors/juce_LinkwitzRileyFilter.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { enum class LinkwitzRileyFilterType @@ -139,5 +137,4 @@ private: Type filterType = Type::lowpass; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_Oversampling.cpp b/modules/juce_dsp/processors/juce_Oversampling.cpp index a028fa7698..7c8b587466 100644 --- a/modules/juce_dsp/processors/juce_Oversampling.cpp +++ b/modules/juce_dsp/processors/juce_Oversampling.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** Abstract class for the provided oversampling stages used internally in @@ -766,5 +764,4 @@ void Oversampling::updateDelayLine() template class Oversampling; template class Oversampling; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_Oversampling.h b/modules/juce_dsp/processors/juce_Oversampling.h index 9d5990ae0b..e57f87cebb 100644 --- a/modules/juce_dsp/processors/juce_Oversampling.h +++ b/modules/juce_dsp/processors/juce_Oversampling.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -210,5 +208,4 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Oversampling) }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_Panner.cpp b/modules/juce_dsp/processors/juce_Panner.cpp index 879cb51913..c94d0de55e 100644 --- a/modules/juce_dsp/processors/juce_Panner.cpp +++ b/modules/juce_dsp/processors/juce_Panner.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -139,5 +137,4 @@ void Panner::update() template class Panner; template class Panner; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_Panner.h b/modules/juce_dsp/processors/juce_Panner.h index 668822e86c..18211adc7d 100644 --- a/modules/juce_dsp/processors/juce_Panner.h +++ b/modules/juce_dsp/processors/juce_Panner.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { enum class PannerRule @@ -117,5 +115,4 @@ private: double sampleRate = 44100.0; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_ProcessContext.h b/modules/juce_dsp/processors/juce_ProcessContext.h index 6da17bb766..9c2dc3800d 100644 --- a/modules/juce_dsp/processors/juce_ProcessContext.h +++ b/modules/juce_dsp/processors/juce_ProcessContext.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -185,5 +183,4 @@ private: AudioBlockType& outputBlock; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_ProcessorChain.h b/modules/juce_dsp/processors/juce_ProcessorChain.h index 59492997e8..b3370bfa5a 100644 --- a/modules/juce_dsp/processors/juce_ProcessorChain.h +++ b/modules/juce_dsp/processors/juce_ProcessorChain.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -159,8 +157,7 @@ inline bool isBypassed (const ProcessorChain& chain) noexcept return chain.template isBypassed(); } -} // namespace dsp -} // namespace juce +} // namespace juce::dsp #ifndef DOXYGEN namespace std diff --git a/modules/juce_dsp/processors/juce_ProcessorChain_test.cpp b/modules/juce_dsp/processors/juce_ProcessorChain_test.cpp index 80ff01fee4..5da32ffa41 100644 --- a/modules/juce_dsp/processors/juce_ProcessorChain_test.cpp +++ b/modules/juce_dsp/processors/juce_ProcessorChain_test.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { class ProcessorChainTest : public UnitTest @@ -163,5 +161,4 @@ public: static ProcessorChainTest processorChainUnitTest; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_ProcessorDuplicator.h b/modules/juce_dsp/processors/juce_ProcessorDuplicator.h index dbc9241919..a1e0ed6996 100644 --- a/modules/juce_dsp/processors/juce_ProcessorDuplicator.h +++ b/modules/juce_dsp/processors/juce_ProcessorDuplicator.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -95,5 +93,4 @@ private: juce::OwnedArray processors; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_ProcessorWrapper.h b/modules/juce_dsp/processors/juce_ProcessorWrapper.h index 3ebe2a0c50..4c3d9d26fc 100644 --- a/modules/juce_dsp/processors/juce_ProcessorWrapper.h +++ b/modules/juce_dsp/processors/juce_ProcessorWrapper.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -77,5 +75,4 @@ struct ProcessorWrapper : public ProcessorBase ProcessorType processor; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_StateVariableFilter.h b/modules/juce_dsp/processors/juce_StateVariableFilter.h index b5a8458ea7..a6c2ed713a 100644 --- a/modules/juce_dsp/processors/juce_StateVariableFilter.h +++ b/modules/juce_dsp/processors/juce_StateVariableFilter.h @@ -23,15 +23,10 @@ ============================================================================== */ -namespace juce -{ -namespace dsp -{ - /** Classes for state variable filter processing. */ -namespace StateVariableFilter +namespace juce::dsp::StateVariableFilter { template struct Parameters; @@ -254,7 +249,5 @@ namespace StateVariableFilter NumericType R2 = static_cast (MathConstants::sqrt2); NumericType h = static_cast (1.0 / (1.0 + R2 * g + g * g)); }; -} -} // namespace dsp -} // namespace juce +} // namespace juce::dsp::StateVariableFilter diff --git a/modules/juce_dsp/processors/juce_StateVariableTPTFilter.cpp b/modules/juce_dsp/processors/juce_StateVariableTPTFilter.cpp index aa85ff48af..f1e458aada 100644 --- a/modules/juce_dsp/processors/juce_StateVariableTPTFilter.cpp +++ b/modules/juce_dsp/processors/juce_StateVariableTPTFilter.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -133,5 +131,4 @@ void StateVariableTPTFilter::update() template class StateVariableTPTFilter; template class StateVariableTPTFilter; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/processors/juce_StateVariableTPTFilter.h b/modules/juce_dsp/processors/juce_StateVariableTPTFilter.h index eea4b07ed5..227fc32b6b 100644 --- a/modules/juce_dsp/processors/juce_StateVariableTPTFilter.h +++ b/modules/juce_dsp/processors/juce_StateVariableTPTFilter.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { enum class StateVariableTPTFilterType @@ -162,5 +160,4 @@ private: resonance = static_cast (1.0 / std::sqrt (2.0)); }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Bias.h b/modules/juce_dsp/widgets/juce_Bias.h index cbd68b86fc..d2a6415c84 100644 --- a/modules/juce_dsp/widgets/juce_Bias.h +++ b/modules/juce_dsp/widgets/juce_Bias.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -155,5 +153,4 @@ private: } }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Chorus.cpp b/modules/juce_dsp/widgets/juce_Chorus.cpp index 7976fc8ddb..d929677ab9 100644 --- a/modules/juce_dsp/widgets/juce_Chorus.cpp +++ b/modules/juce_dsp/widgets/juce_Chorus.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -137,5 +135,4 @@ void Chorus::update() template class Chorus; template class Chorus; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Chorus.h b/modules/juce_dsp/widgets/juce_Chorus.h index af4b691b1d..a3c60a18da 100644 --- a/modules/juce_dsp/widgets/juce_Chorus.h +++ b/modules/juce_dsp/widgets/juce_Chorus.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -165,5 +163,4 @@ private: maximumDelayModulation = 20.0; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Compressor.cpp b/modules/juce_dsp/widgets/juce_Compressor.cpp index e2a73f7822..cad1b5f8c9 100644 --- a/modules/juce_dsp/widgets/juce_Compressor.cpp +++ b/modules/juce_dsp/widgets/juce_Compressor.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -117,5 +115,4 @@ void Compressor::update() template class Compressor; template class Compressor; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Compressor.h b/modules/juce_dsp/widgets/juce_Compressor.h index f05b9a23ca..9395371f47 100644 --- a/modules/juce_dsp/widgets/juce_Compressor.h +++ b/modules/juce_dsp/widgets/juce_Compressor.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -106,5 +104,4 @@ private: SampleType thresholddB = 0.0, ratio = 1.0, attackTime = 1.0, releaseTime = 100.0; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Gain.h b/modules/juce_dsp/widgets/juce_Gain.h index 1e98dc6922..3faa834f5a 100644 --- a/modules/juce_dsp/widgets/juce_Gain.h +++ b/modules/juce_dsp/widgets/juce_Gain.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -144,5 +142,4 @@ private: double sampleRate = 0, rampDurationSeconds = 0; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_LadderFilter.cpp b/modules/juce_dsp/widgets/juce_LadderFilter.cpp index 6a2ad9dc0f..5421263790 100644 --- a/modules/juce_dsp/widgets/juce_LadderFilter.cpp +++ b/modules/juce_dsp/widgets/juce_LadderFilter.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -172,5 +170,4 @@ void LadderFilter::setSampleRate (SampleType newValue) noexcept template class LadderFilter; template class LadderFilter; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_LadderFilter.h b/modules/juce_dsp/widgets/juce_LadderFilter.h index e2f7b58fe8..47b7905147 100644 --- a/modules/juce_dsp/widgets/juce_LadderFilter.h +++ b/modules/juce_dsp/widgets/juce_LadderFilter.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { enum class LadderFilterMode @@ -149,5 +147,4 @@ private: bool enabled = true; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Limiter.cpp b/modules/juce_dsp/widgets/juce_Limiter.cpp index 7a48ef63f2..0fb364f511 100644 --- a/modules/juce_dsp/widgets/juce_Limiter.cpp +++ b/modules/juce_dsp/widgets/juce_Limiter.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -94,5 +92,4 @@ void Limiter::update() template class Limiter; template class Limiter; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Limiter.h b/modules/juce_dsp/widgets/juce_Limiter.h index e61c1797ba..eacfaa896a 100644 --- a/modules/juce_dsp/widgets/juce_Limiter.h +++ b/modules/juce_dsp/widgets/juce_Limiter.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -101,5 +99,4 @@ private: SampleType thresholddB = -10.0, releaseTime = 100.0; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_NoiseGate.cpp b/modules/juce_dsp/widgets/juce_NoiseGate.cpp index 840ee3b5c5..b41da0f442 100644 --- a/modules/juce_dsp/widgets/juce_NoiseGate.cpp +++ b/modules/juce_dsp/widgets/juce_NoiseGate.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -125,5 +123,4 @@ void NoiseGate::update() template class NoiseGate; template class NoiseGate; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_NoiseGate.h b/modules/juce_dsp/widgets/juce_NoiseGate.h index 58de30a60f..5432f53b64 100644 --- a/modules/juce_dsp/widgets/juce_NoiseGate.h +++ b/modules/juce_dsp/widgets/juce_NoiseGate.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -106,5 +104,4 @@ private: SampleType thresholddB = -100, ratio = 10.0, attackTime = 1.0, releaseTime = 100.0; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Oscillator.h b/modules/juce_dsp/widgets/juce_Oscillator.h index 925827070d..082d5df8ed 100644 --- a/modules/juce_dsp/widgets/juce_Oscillator.h +++ b/modules/juce_dsp/widgets/juce_Oscillator.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -247,5 +245,4 @@ private: Phase phase; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Phaser.cpp b/modules/juce_dsp/widgets/juce_Phaser.cpp index 50b17d5f04..2b573d2929 100644 --- a/modules/juce_dsp/widgets/juce_Phaser.cpp +++ b/modules/juce_dsp/widgets/juce_Phaser.cpp @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { //============================================================================== @@ -150,5 +148,4 @@ void Phaser::update() template class Phaser; template class Phaser; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Phaser.h b/modules/juce_dsp/widgets/juce_Phaser.h index f8263d3e80..d569150a0f 100644 --- a/modules/juce_dsp/widgets/juce_Phaser.h +++ b/modules/juce_dsp/widgets/juce_Phaser.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -202,5 +200,4 @@ private: static constexpr int numStages = 6; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_Reverb.h b/modules/juce_dsp/widgets/juce_Reverb.h index 677df27a98..6d21a96f89 100644 --- a/modules/juce_dsp/widgets/juce_Reverb.h +++ b/modules/juce_dsp/widgets/juce_Reverb.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -111,5 +109,4 @@ private: bool enabled = true; }; -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_dsp/widgets/juce_WaveShaper.h b/modules/juce_dsp/widgets/juce_WaveShaper.h index 995c20e7d7..ac5310019a 100644 --- a/modules/juce_dsp/widgets/juce_WaveShaper.h +++ b/modules/juce_dsp/widgets/juce_WaveShaper.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace dsp +namespace juce::dsp { /** @@ -79,5 +77,4 @@ template static WaveShaper, Functor> CreateWaveShaper (Functor functionToUse) { return {functionToUse}; } #endif -} // namespace dsp -} // namespace juce +} // namespace juce::dsp diff --git a/modules/juce_events/native/juce_EventLoop_linux.h b/modules/juce_events/native/juce_EventLoop_linux.h index 3032d20fd9..676e2b999a 100644 --- a/modules/juce_events/native/juce_EventLoop_linux.h +++ b/modules/juce_events/native/juce_EventLoop_linux.h @@ -20,11 +20,9 @@ ============================================================================== */ -namespace juce +namespace juce::LinuxEventLoop { -namespace LinuxEventLoop -{ /** Registers a callback that will be called when a file descriptor is ready for I/O. This will add the given file descriptor to the internal set of file descriptors @@ -45,6 +43,5 @@ namespace LinuxEventLoop @see registerFdCallback */ void unregisterFdCallback (int fd); -} -} // namespace juce +} // namespace juce::LinuxEventLoop diff --git a/modules/juce_graphics/colour/juce_Colours.h b/modules/juce_graphics/colour/juce_Colours.h index 434b2b169e..0cfed34dcf 100644 --- a/modules/juce_graphics/colour/juce_Colours.h +++ b/modules/juce_graphics/colour/juce_Colours.h @@ -23,10 +23,6 @@ ============================================================================== */ -namespace juce -{ - -//============================================================================== /** Contains a set of predefined named colours (mostly standard HTML colours) @@ -34,7 +30,7 @@ namespace juce @tags{Graphics} */ -namespace Colours +namespace juce::Colours { const Colour transparentBlack { 0 }; @@ -191,6 +187,5 @@ namespace Colours */ JUCE_API Colour findColourForName (const String& colourName, Colour defaultColour); -} // namespace Colours -} // namespace juce +} // namespace juce::Colours diff --git a/modules/juce_graphics/native/juce_RenderingHelpers.h b/modules/juce_graphics/native/juce_RenderingHelpers.h index d9fd8c9965..1f39264304 100644 --- a/modules/juce_graphics/native/juce_RenderingHelpers.h +++ b/modules/juce_graphics/native/juce_RenderingHelpers.h @@ -23,14 +23,11 @@ ============================================================================== */ -namespace juce +namespace juce::RenderingHelpers { JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4127) -namespace RenderingHelpers -{ - //============================================================================== /** Holds either a simple integer translation, or an affine transform. @@ -2736,8 +2733,6 @@ protected: RenderingHelpers::SavedStateStack stack; }; -} - JUCE_END_IGNORE_WARNINGS_MSVC -} // namespace juce +} // namespace juce::RenderingHelpers diff --git a/modules/juce_gui_basics/layout/juce_AnimatedPositionBehaviours.h b/modules/juce_gui_basics/layout/juce_AnimatedPositionBehaviours.h index 5786d780bf..97d1dee9f3 100644 --- a/modules/juce_gui_basics/layout/juce_AnimatedPositionBehaviours.h +++ b/modules/juce_gui_basics/layout/juce_AnimatedPositionBehaviours.h @@ -23,15 +23,13 @@ ============================================================================== */ -namespace juce -{ - //============================================================================== /** Contains classes for different types of physics behaviours - these classes are used as template parameters for the AnimatedPosition class. */ -namespace AnimatedPositionBehaviours +namespace juce::AnimatedPositionBehaviours { + /** A non-snapping behaviour that allows the content to be freely flicked in either direction, with momentum based on the velocity at which it was released, and variable friction to make it come to a halt. @@ -151,6 +149,5 @@ namespace AnimatedPositionBehaviours private: double targetSnapPosition = 0.0; }; -} -} // namespace juce +} // namespace juce::AnimatedPositionBehaviours diff --git a/modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h b/modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h index 53a24220ce..e0236867c1 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h +++ b/modules/juce_gui_basics/native/accessibility/juce_ComInterfaces_windows.h @@ -23,9 +23,7 @@ ============================================================================== */ -namespace juce -{ -namespace ComTypes +namespace juce::ComTypes { /* @@ -474,8 +472,7 @@ public: constexpr CLSID CLSID_SpVoice { 0x96749377, 0x3391, 0x11D2, { 0x9E, 0xE3, 0x00, 0xC0, 0x4F, 0x79, 0x73, 0x96 } }; -} // namespace ComTypes -} // namespace juce +} // namespace juce::ComTypes #ifdef __CRT_UUID_DECL __CRT_UUID_DECL (juce::ComTypes::IRawElementProviderFragmentRoot, 0x620ce2a5, 0xab8f, 0x40a9, 0x86, 0xcb, 0xde, 0x3c, 0x75, 0x59, 0x9b, 0x58) diff --git a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp index 3ea9659305..b05319f109 100644 --- a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp +++ b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp @@ -23,12 +23,9 @@ ============================================================================== */ -namespace juce -{ - #if JUCE_ENABLE_LIVE_CONSTANT_EDITOR -namespace LiveConstantEditor +namespace juce::LiveConstantEditor { //============================================================================== @@ -490,8 +487,6 @@ Component* createIntegerSlider (LivePropertyEditorBase& editor) { return new Sl Component* createFloatSlider (LivePropertyEditorBase& editor) { return new SliderComp (editor, true); } Component* createBoolSlider (LivePropertyEditorBase& editor) { return new BoolSliderComp (editor); } -} +} // namespace juce::LiveConstantEditor #endif - -} // namespace juce diff --git a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h index 9f12166ef1..a5ad7a26dc 100644 --- a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h +++ b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h @@ -23,16 +23,13 @@ ============================================================================== */ -namespace juce -{ - #if JUCE_ENABLE_LIVE_CONSTANT_EDITOR && ! defined (DOXYGEN) //============================================================================== /** You can safely ignore all the stuff in this namespace - it's a bunch of boilerplate code used to implement the JUCE_LIVE_CONSTANT functionality. */ -namespace LiveConstantEditor +namespace juce::LiveConstantEditor { int64 parseInt (String); double parseDouble (const String&); @@ -243,7 +240,8 @@ namespace LiveConstantEditor { return getValue (file, line, String (initialValue)); } -} + +} // namespace juce::LiveConstantEditor #endif @@ -301,5 +299,3 @@ namespace LiveConstantEditor #define JUCE_LIVE_CONSTANT(initialValue) \ (initialValue) #endif - -} // namespace juce diff --git a/modules/juce_opengl/opengl/juce_gl.h b/modules/juce_opengl/opengl/juce_gl.h index a722e4f611..8a088c4df6 100644 --- a/modules/juce_opengl/opengl/juce_gl.h +++ b/modules/juce_opengl/opengl/juce_gl.h @@ -202,9 +202,7 @@ typedef void ( *GLVULKANPROCNV)(void); JUCE_END_IGNORE_WARNINGS_GCC_LIKE -namespace juce -{ -namespace gl +namespace juce::gl { #ifndef GL_VERSION_1_0 @@ -12004,5 +12002,4 @@ void loadFunctions(); */ void loadExtensions(); -} -} +} // namespace juce::gl diff --git a/modules/juce_opengl/opengl/juce_gles2.h b/modules/juce_opengl/opengl/juce_gles2.h index 9e07b85db4..5df7b54b4b 100644 --- a/modules/juce_opengl/opengl/juce_gles2.h +++ b/modules/juce_opengl/opengl/juce_gles2.h @@ -95,9 +95,7 @@ typedef void ( *GLVULKANPROCNV)(void); JUCE_END_IGNORE_WARNINGS_GCC_LIKE -namespace juce -{ -namespace gl +namespace juce::gl { #ifndef GL_ES_VERSION_2_0 @@ -5266,5 +5264,4 @@ void loadFunctions(); */ void loadExtensions(); -} -} +} // namespace juce::gl diff --git a/modules/juce_opengl/opengl/juce_wgl.h b/modules/juce_opengl/opengl/juce_wgl.h index 101a8ecd16..f1d610ad74 100644 --- a/modules/juce_opengl/opengl/juce_wgl.h +++ b/modules/juce_opengl/opengl/juce_wgl.h @@ -31,9 +31,7 @@ -namespace juce -{ -namespace gl +namespace juce::gl { @@ -643,5 +641,4 @@ enum : GLenum }; #endif -} -} +} // namespace juce::gl