From 4cf66d65221bee100c3de490ca3fe6fafc72f508 Mon Sep 17 00:00:00 2001 From: reuk Date: Sun, 26 Apr 2020 17:23:53 +0100 Subject: [PATCH] Cleanup: Remove redundant inlines --- .../buffers/juce_AudioDataConverters.h | 26 +++---- .../buffers/juce_FloatVectorOperations.cpp | 2 +- .../native/juce_win32_DirectSound.cpp | 2 +- .../AAX/juce_AAX_Wrapper.cpp | 4 +- .../VST/juce_VST_Wrapper.cpp | 2 +- .../VST3/juce_VST3_Wrapper.cpp | 8 +-- .../juce_AudioUnitPluginFormat.mm | 2 +- .../format_types/juce_VST3Common.h | 68 ++++--------------- .../format_types/juce_VSTCommon.h | 4 +- .../gui/juce_AudioThumbnailCache.cpp | 2 +- .../internal/juce_BandwidthStatsLogger.cpp | 6 +- modules/juce_core/containers/juce_HashMap.h | 2 +- modules/juce_core/containers/juce_Variant.cpp | 4 +- modules/juce_core/maths/juce_Expression.cpp | 2 +- modules/juce_core/memory/juce_WeakReference.h | 2 +- .../misc/juce_ConsoleApplication.cpp | 14 ++-- .../native/juce_android_JNIHelpers.h | 2 +- .../native/juce_android_SystemStats.cpp | 6 +- .../native/juce_linux_SystemStats.cpp | 2 +- .../juce_core/native/juce_osx_ObjCHelpers.h | 36 +++++----- .../juce_core/native/juce_posix_SharedCode.h | 4 +- .../streams/juce_BufferedInputStream.cpp | 2 +- .../juce_core/text/juce_CharPointer_ASCII.h | 2 +- .../juce_core/text/juce_CharPointer_UTF32.h | 2 +- .../juce_core/text/juce_CharacterFunctions.h | 4 +- modules/juce_core/text/juce_String.cpp | 10 +-- modules/juce_core/time/juce_Time.cpp | 14 ++-- modules/juce_core/xml/juce_XmlElement.cpp | 4 +- .../juce_cryptography/hashing/juce_MD5.cpp | 10 +-- .../juce_cryptography/hashing/juce_SHA256.cpp | 16 ++--- .../juce_dsp/containers/juce_SIMDRegister.h | 38 +++++------ .../containers/juce_SIMDRegister_Impl.h | 32 ++++----- modules/juce_dsp/frequency/juce_Windowing.cpp | 2 +- modules/juce_dsp/maths/juce_Matrix.h | 2 +- .../juce_ConnectedChildProcess.cpp | 2 +- modules/juce_events/timers/juce_Timer.cpp | 6 +- .../effects/juce_DropShadowEffect.cpp | 2 +- .../fonts/juce_GlyphArrangement.cpp | 4 +- modules/juce_graphics/geometry/juce_Path.cpp | 2 +- .../components/juce_Component.cpp | 2 +- .../native/juce_win32_Windowing.cpp | 6 +- .../code_editor/juce_CodeDocument.cpp | 2 +- .../native/juce_win32_ActiveXComponent.cpp | 4 +- .../native/juce_OpenGLExtensions.h | 6 +- .../marketplace/juce_KeyFileGeneration.h | 2 +- 45 files changed, 170 insertions(+), 206 deletions(-) diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h index 2f91b0406a..af8198c617 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h @@ -69,22 +69,22 @@ public: class BigEndian { public: - template static inline float getAsFloat (SampleFormatType& s) noexcept { return s.getAsFloatBE(); } - template static inline void setAsFloat (SampleFormatType& s, float newValue) noexcept { s.setAsFloatBE (newValue); } - template static inline int32 getAsInt32 (SampleFormatType& s) noexcept { return s.getAsInt32BE(); } - template static inline void setAsInt32 (SampleFormatType& s, int32 newValue) noexcept { s.setAsInt32BE (newValue); } - template static inline void copyFrom (DestType& dest, SourceType& source) noexcept { dest.copyFromBE (source); } + template static float getAsFloat (SampleFormatType& s) noexcept { return s.getAsFloatBE(); } + template static void setAsFloat (SampleFormatType& s, float newValue) noexcept { s.setAsFloatBE (newValue); } + template static int32 getAsInt32 (SampleFormatType& s) noexcept { return s.getAsInt32BE(); } + template static void setAsInt32 (SampleFormatType& s, int32 newValue) noexcept { s.setAsInt32BE (newValue); } + template static void copyFrom (DestType& dest, SourceType& source) noexcept { dest.copyFromBE (source); } enum { isBigEndian = 1 }; }; class LittleEndian { public: - template static inline float getAsFloat (SampleFormatType& s) noexcept { return s.getAsFloatLE(); } - template static inline void setAsFloat (SampleFormatType& s, float newValue) noexcept { s.setAsFloatLE (newValue); } - template static inline int32 getAsInt32 (SampleFormatType& s) noexcept { return s.getAsInt32LE(); } - template static inline void setAsInt32 (SampleFormatType& s, int32 newValue) noexcept { s.setAsInt32LE (newValue); } - template static inline void copyFrom (DestType& dest, SourceType& source) noexcept { dest.copyFromLE (source); } + template static float getAsFloat (SampleFormatType& s) noexcept { return s.getAsFloatLE(); } + template static void setAsFloat (SampleFormatType& s, float newValue) noexcept { s.setAsFloatLE (newValue); } + template static int32 getAsInt32 (SampleFormatType& s) noexcept { return s.getAsInt32LE(); } + template static void setAsInt32 (SampleFormatType& s, int32 newValue) noexcept { s.setAsInt32LE (newValue); } + template static void copyFrom (DestType& dest, SourceType& source) noexcept { dest.copyFromLE (source); } enum { isBigEndian = 0 }; }; @@ -284,7 +284,7 @@ public: template inline void advanceData (SampleFormatType& s) noexcept { s.advance(); } template inline void advanceDataBy (SampleFormatType& s, int numSamples) noexcept { s.skip (numSamples); } template inline void clear (SampleFormatType& s, int numSamples) noexcept { s.clearMultiple (numSamples); } - template inline static int getNumBytesBetweenSamples (const SampleFormatType&) noexcept { return SampleFormatType::bytesPerSample; } + template static int getNumBytesBetweenSamples (const SampleFormatType&) noexcept { return SampleFormatType::bytesPerSample; } enum { isInterleavedType = 0, numInterleavedChannels = 1 }; }; @@ -309,7 +309,7 @@ public: { public: using VoidType = void; - static inline void* toVoidPtr (VoidType* v) noexcept { return v; } + static void* toVoidPtr (VoidType* v) noexcept { return v; } enum { isConst = 0 }; }; @@ -317,7 +317,7 @@ public: { public: using VoidType = const void; - static inline void* toVoidPtr (VoidType* v) noexcept { return const_cast (v); } + static void* toVoidPtr (VoidType* v) noexcept { return const_cast (v); } enum { isConst = 1 }; }; #endif diff --git a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp index 0ae5d31307..5a761a3031 100644 --- a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp +++ b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp @@ -30,7 +30,7 @@ namespace FloatVectorHelpers #define JUCE_INCREMENT_DEST dest += (16 / sizeof (*dest)); #if JUCE_USE_SSE_INTRINSICS - inline static bool isAligned (const void* p) noexcept + static bool isAligned (const void* p) noexcept { return (((pointer_sized_int) p) & 15) == 0; } diff --git a/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp b/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp index ac7171dfa6..81ff6edcbb 100644 --- a/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp +++ b/modules/juce_audio_devices/native/juce_win32_DirectSound.cpp @@ -518,7 +518,7 @@ private: bool firstPlayTime; int64 lastPlayTime, ticksPerBuffer; - static inline int convertInputValues (const float l, const float r) noexcept + static int convertInputValues (const float l, const float r) noexcept { return jlimit (-32768, 32767, roundToInt (32767.0f * r)) << 16 | (0xffff & jlimit (-32768, 32767, roundToInt (32767.0f * l))); diff --git a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp index 1f705b6a9e..f27a845070 100644 --- a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp @@ -274,7 +274,7 @@ namespace AAXClasses return AAX_eStemFormat_INT32_MAX; } - static inline AudioChannelSet channelSetFromStemFormat (AAX_EStemFormat format, bool ignoreLayout) noexcept + static AudioChannelSet channelSetFromStemFormat (AAX_EStemFormat format, bool ignoreLayout) noexcept { if (! ignoreLayout) { @@ -2199,7 +2199,7 @@ namespace AAXClasses check (desc.AddProcessProc_Native (algorithmProcessCallback, properties)); } - static inline bool hostSupportsStemFormat (AAX_EStemFormat stemFormat, const AAX_IFeatureInfo* featureInfo) + static bool hostSupportsStemFormat (AAX_EStemFormat stemFormat, const AAX_IFeatureInfo* featureInfo) { if (featureInfo != nullptr) { diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index c12731653f..b4bad915a1 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -1389,7 +1389,7 @@ private: && (int32) hostCallback (&vstEffect, Vst2::audioMasterGetCurrentProcessLevel, 0, 0, nullptr, 0) == 4; } - static inline int32 convertHexVersionToDecimal (const unsigned int hexVersion) + static int32 convertHexVersionToDecimal (const unsigned int hexVersion) { #if JUCE_VST_RETURN_HEX_VERSION_NUMBER_DIRECTLY return (int32) hexVersion; diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 605731bff8..7f5632b850 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -1565,12 +1565,12 @@ private: namespace { template struct AudioBusPointerHelper {}; - template <> struct AudioBusPointerHelper { static inline float** impl (Vst::AudioBusBuffers& data) noexcept { return data.channelBuffers32; } }; - template <> struct AudioBusPointerHelper { static inline double** impl (Vst::AudioBusBuffers& data) noexcept { return data.channelBuffers64; } }; + template <> struct AudioBusPointerHelper { static float** impl (Vst::AudioBusBuffers& data) noexcept { return data.channelBuffers32; } }; + template <> struct AudioBusPointerHelper { static double** impl (Vst::AudioBusBuffers& data) noexcept { return data.channelBuffers64; } }; template struct ChooseBufferHelper {}; - template <> struct ChooseBufferHelper { static inline AudioBuffer& impl (AudioBuffer& f, AudioBuffer& ) noexcept { return f; } }; - template <> struct ChooseBufferHelper { static inline AudioBuffer& impl (AudioBuffer& , AudioBuffer& d) noexcept { return d; } }; + template <> struct ChooseBufferHelper { static AudioBuffer& impl (AudioBuffer& f, AudioBuffer& ) noexcept { return f; } }; + template <> struct ChooseBufferHelper { static AudioBuffer& impl (AudioBuffer& , AudioBuffer& d) noexcept { return d; } }; } diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index cf04da482d..6d3f29e1d2 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -2016,7 +2016,7 @@ private: } //============================================================================== - static inline UInt64 GetCurrentHostTime (int numSamples, double sampleRate, bool isAUv3) noexcept + static UInt64 GetCurrentHostTime (int numSamples, double sampleRate, bool isAUv3) noexcept { #if ! JUCE_IOS if (! isAUv3) diff --git a/modules/juce_audio_processors/format_types/juce_VST3Common.h b/modules/juce_audio_processors/format_types/juce_VST3Common.h index 514d944788..1f3d515a18 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Common.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Common.h @@ -105,45 +105,7 @@ static inline Steinberg::Vst::SpeakerArrangement getArrangementForBus (Steinberg return arrangement; } -/** For the sake of simplicity, there can only be 1 arrangement type per channel count. - i.e.: 4 channels == k31Cine OR k40Cine -*/ -static inline Steinberg::Vst::SpeakerArrangement getArrangementForNumChannels (int numChannels) noexcept -{ - using namespace Steinberg::Vst::SpeakerArr; - - switch (numChannels) - { - case 0: return kEmpty; - case 1: return kMono; - case 2: return kStereo; - case 3: return k30Cine; - case 4: return k31Cine; - case 5: return k50; - case 6: return k51; - case 7: return k61Cine; - case 8: return k71CineFullFront; - case 9: return k90; - case 10: return k91; - case 11: return k101; - case 12: return k111; - case 13: return k130; - case 14: return k131; - #if VST_VERSION >= 0x030608 - case 16: return kAmbi3rdOrderACN; - #endif - case 24: return (Steinberg::Vst::SpeakerArrangement) 1929904127; // k222 - default: break; - } - - jassert (numChannels >= 0); - - juce::BigInteger bi; - bi.setRange (0, jmin (numChannels, (int) (sizeof (Steinberg::Vst::SpeakerArrangement) * 8)), true); - return (Steinberg::Vst::SpeakerArrangement) bi.toInt64(); -} - -static inline Steinberg::Vst::Speaker getSpeakerType (const AudioChannelSet& set, AudioChannelSet::ChannelType type) noexcept +static Steinberg::Vst::Speaker getSpeakerType (const AudioChannelSet& set, AudioChannelSet::ChannelType type) noexcept { switch (type) { @@ -231,7 +193,7 @@ static inline Steinberg::Vst::Speaker getSpeakerType (const AudioChannelSet& set return (1ull << (channelIndex + 33ull /* last speaker in vst layout + 1 */)); } -static inline AudioChannelSet::ChannelType getChannelType (Steinberg::Vst::SpeakerArrangement arr, Steinberg::Vst::Speaker type) noexcept +static AudioChannelSet::ChannelType getChannelType (Steinberg::Vst::SpeakerArrangement arr, Steinberg::Vst::Speaker type) noexcept { switch (type) { @@ -296,7 +258,7 @@ static inline AudioChannelSet::ChannelType getChannelType (Steinberg::Vst::Speak return static_cast (static_cast (AudioChannelSet::discreteChannel0) + 6 + (channelType - 33)); } -static inline Steinberg::Vst::SpeakerArrangement getVst3SpeakerArrangement (const AudioChannelSet& channels) noexcept +static Steinberg::Vst::SpeakerArrangement getVst3SpeakerArrangement (const AudioChannelSet& channels) noexcept { using namespace Steinberg::Vst::SpeakerArr; @@ -337,7 +299,7 @@ static inline Steinberg::Vst::SpeakerArrangement getVst3SpeakerArrangement (cons return result; } -static inline AudioChannelSet getChannelSetForSpeakerArrangement (Steinberg::Vst::SpeakerArrangement arr) noexcept +static AudioChannelSet getChannelSetForSpeakerArrangement (Steinberg::Vst::SpeakerArrangement arr) noexcept { using namespace Steinberg::Vst::SpeakerArr; @@ -788,8 +750,8 @@ struct VST3BufferExchange using Bus = Array; using BusMap = Array; - static inline void assignRawPointer (Steinberg::Vst::AudioBusBuffers& vstBuffers, float** raw) { vstBuffers.channelBuffers32 = raw; } - static inline void assignRawPointer (Steinberg::Vst::AudioBusBuffers& vstBuffers, double** raw) { vstBuffers.channelBuffers64 = raw; } + static void assignRawPointer (Steinberg::Vst::AudioBusBuffers& vstBuffers, float** raw) { vstBuffers.channelBuffers32 = raw; } + static void assignRawPointer (Steinberg::Vst::AudioBusBuffers& vstBuffers, double** raw) { vstBuffers.channelBuffers64 = raw; } /** Assigns a series of AudioBuffer's channels to an AudioBusBuffers' @warning For speed, does not check the channel count and offsets according to the AudioBuffer @@ -833,9 +795,9 @@ struct VST3BufferExchange channelIndexOffset += numChansForBus; } - static inline void mapBufferToBuses (Array& result, BusMap& busMapToUse, - const Array& arrangements, - AudioBuffer& source) + static void mapBufferToBuses (Array& result, BusMap& busMapToUse, + const Array& arrangements, + AudioBuffer& source) { int channelIndexOffset = 0; @@ -844,10 +806,10 @@ struct VST3BufferExchange arrangements.getUnchecked (i), source); } - static inline void mapBufferToBuses (Array& result, - Steinberg::Vst::IAudioProcessor& processor, - BusMap& busMapToUse, bool isInput, int numBuses, - AudioBuffer& source) + static void mapBufferToBuses (Array& result, + Steinberg::Vst::IAudioProcessor& processor, + BusMap& busMapToUse, bool isInput, int numBuses, + AudioBuffer& source) { int channelIndexOffset = 0; @@ -874,12 +836,12 @@ struct VST3FloatAndDoubleBusMapComposite template <> struct VST3FloatAndDoubleBusMapCompositeHelper { - static inline VST3BufferExchange::BusMap& get (VST3FloatAndDoubleBusMapComposite& impl) { return impl.floatVersion; } + static VST3BufferExchange::BusMap& get (VST3FloatAndDoubleBusMapComposite& impl) { return impl.floatVersion; } }; template <> struct VST3FloatAndDoubleBusMapCompositeHelper { - static inline VST3BufferExchange::BusMap& get (VST3FloatAndDoubleBusMapComposite& impl) { return impl.doubleVersion; } + static VST3BufferExchange::BusMap& get (VST3FloatAndDoubleBusMapComposite& impl) { return impl.doubleVersion; } }; } // namespace juce diff --git a/modules/juce_audio_processors/format_types/juce_VSTCommon.h b/modules/juce_audio_processors/format_types/juce_VSTCommon.h index 695f05ae0b..dc4c709214 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTCommon.h +++ b/modules/juce_audio_processors/format_types/juce_VSTCommon.h @@ -271,7 +271,7 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e return mappings; } - static inline int32 getSpeakerType (AudioChannelSet::ChannelType type) noexcept + static int32 getSpeakerType (AudioChannelSet::ChannelType type) noexcept { static const std::map speakerTypeMap = { @@ -302,7 +302,7 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e return speakerTypeMap.at (type); } - static inline AudioChannelSet::ChannelType getChannelType (int32 type) noexcept + static AudioChannelSet::ChannelType getChannelType (int32 type) noexcept { switch (type) { diff --git a/modules/juce_audio_utils/gui/juce_AudioThumbnailCache.cpp b/modules/juce_audio_utils/gui/juce_AudioThumbnailCache.cpp index c609806489..4d84fd961f 100644 --- a/modules/juce_audio_utils/gui/juce_AudioThumbnailCache.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioThumbnailCache.cpp @@ -147,7 +147,7 @@ void AudioThumbnailCache::removeThumb (const int64 hashCode) thumbs.remove (i); } -static inline int getThumbnailCacheFileMagicHeader() noexcept +static int getThumbnailCacheFileMagicHeader() noexcept { return (int) ByteOrder::littleEndianInt ("ThmC"); } diff --git a/modules/juce_blocks_basics/topology/internal/juce_BandwidthStatsLogger.cpp b/modules/juce_blocks_basics/topology/internal/juce_BandwidthStatsLogger.cpp index 0683d98234..568cd10dbe 100644 --- a/modules/juce_blocks_basics/topology/internal/juce_BandwidthStatsLogger.cpp +++ b/modules/juce_blocks_basics/topology/internal/juce_BandwidthStatsLogger.cpp @@ -67,7 +67,7 @@ namespace static PortIOStats inputStats { "Input" }, outputStats { "Output" }; static uint32 startTime = 0; - static inline void resetOnSecondBoundary() + static void resetOnSecondBoundary() { auto now = Time::getMillisecondCounter(); double elapsedSec = (now - startTime) / 1000.0; @@ -80,13 +80,13 @@ namespace } } - static inline void registerBytesOut (int numBytes) + static void registerBytesOut (int numBytes) { outputStats.registerMessage (numBytes); resetOnSecondBoundary(); } - static inline void registerBytesIn (int numBytes) + static void registerBytesIn (int numBytes) { inputStats.registerMessage (numBytes); resetOnSecondBoundary(); diff --git a/modules/juce_core/containers/juce_HashMap.h b/modules/juce_core/containers/juce_HashMap.h index 589265f77f..72a5555519 100644 --- a/modules/juce_core/containers/juce_HashMap.h +++ b/modules/juce_core/containers/juce_HashMap.h @@ -489,7 +489,7 @@ private: return hash; } - static inline HashEntry* getEntry (HashEntry* firstEntry, KeyType keyToLookFor) noexcept + static HashEntry* getEntry (HashEntry* firstEntry, KeyType keyToLookFor) noexcept { for (auto* entry = firstEntry; entry != nullptr; entry = entry->nextEntry) if (entry->key == keyToLookFor) diff --git a/modules/juce_core/containers/juce_Variant.cpp b/modules/juce_core/containers/juce_Variant.cpp index c8a46f3dde..72fbcdaa90 100644 --- a/modules/juce_core/containers/juce_Variant.cpp +++ b/modules/juce_core/containers/juce_Variant.cpp @@ -257,8 +257,8 @@ public: } private: - static inline const String* getString (const ValueUnion& data) noexcept { return reinterpret_cast (data.stringValue); } - static inline String* getString (ValueUnion& data) noexcept { return reinterpret_cast (data.stringValue); } + static const String* getString (const ValueUnion& data) noexcept { return reinterpret_cast (data.stringValue); } + static String* getString (ValueUnion& data) noexcept { return reinterpret_cast (data.stringValue); } }; //============================================================================== diff --git a/modules/juce_core/maths/juce_Expression.cpp b/modules/juce_core/maths/juce_Expression.cpp index 7bf3a323d5..edbb074356 100644 --- a/modules/juce_core/maths/juce_Expression.cpp +++ b/modules/juce_core/maths/juce_Expression.cpp @@ -681,7 +681,7 @@ struct Expression::Helpers } //============================================================================== - static inline bool isDecimalDigit (const juce_wchar c) noexcept + static bool isDecimalDigit (const juce_wchar c) noexcept { return c >= '0' && c <= '9'; } diff --git a/modules/juce_core/memory/juce_WeakReference.h b/modules/juce_core/memory/juce_WeakReference.h index 471299430f..64fae8d814 100644 --- a/modules/juce_core/memory/juce_WeakReference.h +++ b/modules/juce_core/memory/juce_WeakReference.h @@ -201,7 +201,7 @@ public: private: SharedRef holder; - static inline SharedRef getRef (ObjectType* o) + static SharedRef getRef (ObjectType* o) { if (o != nullptr) return o->masterReference.getSharedPointer (o); diff --git a/modules/juce_core/misc/juce_ConsoleApplication.cpp b/modules/juce_core/misc/juce_ConsoleApplication.cpp index eaba344bf0..57cfe62964 100644 --- a/modules/juce_core/misc/juce_ConsoleApplication.cpp +++ b/modules/juce_core/misc/juce_ConsoleApplication.cpp @@ -23,12 +23,12 @@ namespace juce { -static inline File resolveFilename (const String& name) +static File resolveFilename (const String& name) { return File::getCurrentWorkingDirectory().getChildFile (name.unquoted()); } -static inline File checkFileExists (const File& f) +static File checkFileExists (const File& f) { if (! f.exists()) ConsoleApplication::fail ("Could not find file: " + f.getFullPathName()); @@ -36,7 +36,7 @@ static inline File checkFileExists (const File& f) return f; } -static inline File checkFolderExists (const File& f) +static File checkFolderExists (const File& f) { if (! f.isDirectory()) ConsoleApplication::fail ("Could not find folder: " + f.getFullPathName()); @@ -44,7 +44,7 @@ static inline File checkFolderExists (const File& f) return f; } -static inline File resolveFilenameForOption (const ArgumentList& args, StringRef option, const String& filename) +static File resolveFilenameForOption (const ArgumentList& args, StringRef option, const String& filename) { if (filename.isEmpty()) { @@ -75,9 +75,9 @@ File ArgumentList::Argument::resolveAsExistingFolder() const return f; } -static inline bool isShortOptionFormat (StringRef s) { return s[0] == '-' && s[1] != '-'; } -static inline bool isLongOptionFormat (StringRef s) { return s[0] == '-' && s[1] == '-' && s[2] != '-'; } -static inline bool isOptionFormat (StringRef s) { return s[0] == '-'; } +static bool isShortOptionFormat (StringRef s) { return s[0] == '-' && s[1] != '-'; } +static bool isLongOptionFormat (StringRef s) { return s[0] == '-' && s[1] == '-' && s[2] != '-'; } +static bool isOptionFormat (StringRef s) { return s[0] == '-'; } bool ArgumentList::Argument::isLongOption() const { return isLongOptionFormat (text); } bool ArgumentList::Argument::isShortOption() const { return isShortOptionFormat (text); } diff --git a/modules/juce_core/native/juce_android_JNIHelpers.h b/modules/juce_core/native/juce_android_JNIHelpers.h index 6901c41f5b..29b0fbdee8 100644 --- a/modules/juce_core/native/juce_android_JNIHelpers.h +++ b/modules/juce_core/native/juce_android_JNIHelpers.h @@ -149,7 +149,7 @@ private: //============================================================================== jobject obj = nullptr; - static inline jobject retain (jobject obj, JNIEnv* env) + static jobject retain (jobject obj, JNIEnv* env) { return obj == nullptr ? nullptr : env->NewGlobalRef (obj); } diff --git a/modules/juce_core/native/juce_android_SystemStats.cpp b/modules/juce_core/native/juce_android_SystemStats.cpp index 46d300fa94..32248e0741 100644 --- a/modules/juce_core/native/juce_android_SystemStats.cpp +++ b/modules/juce_core/native/juce_android_SystemStats.cpp @@ -40,14 +40,14 @@ namespace AndroidStatsHelpers DECLARE_JNI_CLASS (JavaLocale, "java/util/Locale") #undef JNI_CLASS_MEMBERS - static inline String getSystemProperty (const String& name) + static String getSystemProperty (const String& name) { return juceString (LocalRef ((jstring) getEnv()->CallStaticObjectMethod (SystemClass, SystemClass.getProperty, javaString (name).get()))); } - static inline String getLocaleValue (bool isRegion) + static String getLocaleValue (bool isRegion) { auto* env = getEnv(); LocalRef locale (env->CallStaticObjectMethod (JavaLocale, JavaLocale.getDefault)); @@ -58,7 +58,7 @@ namespace AndroidStatsHelpers return juceString (LocalRef ((jstring) stringResult)); } - static inline String getAndroidOsBuildValue (const char* fieldName) + static String getAndroidOsBuildValue (const char* fieldName) { return juceString (LocalRef ((jstring) getEnv()->GetStaticObjectField ( AndroidBuild, getEnv()->GetStaticFieldID (AndroidBuild, fieldName, "Ljava/lang/String;")))); diff --git a/modules/juce_core/native/juce_linux_SystemStats.cpp b/modules/juce_core/native/juce_linux_SystemStats.cpp index 313bda8709..7ea5fcef0c 100644 --- a/modules/juce_core/native/juce_linux_SystemStats.cpp +++ b/modules/juce_core/native/juce_linux_SystemStats.cpp @@ -54,7 +54,7 @@ bool SystemStats::isOperatingSystem64Bit() } //============================================================================== -static inline String getCpuInfo (const char* key) +static String getCpuInfo (const char* key) { return readPosixConfigFileValue ("/proc/cpuinfo", key); } diff --git a/modules/juce_core/native/juce_osx_ObjCHelpers.h b/modules/juce_core/native/juce_osx_ObjCHelpers.h index fb668587fd..407d263d04 100644 --- a/modules/juce_core/native/juce_osx_ObjCHelpers.h +++ b/modules/juce_core/native/juce_osx_ObjCHelpers.h @@ -27,37 +27,37 @@ namespace juce { //============================================================================== -static inline String nsStringToJuce (NSString* s) +inline String nsStringToJuce (NSString* s) { return CharPointer_UTF8 ([s UTF8String]); } -static inline NSString* juceStringToNS (const String& s) +inline NSString* juceStringToNS (const String& s) { return [NSString stringWithUTF8String: s.toUTF8()]; } -static inline NSString* nsStringLiteral (const char* const s) noexcept +inline NSString* nsStringLiteral (const char* const s) noexcept { return [NSString stringWithUTF8String: s]; } -static inline NSString* nsEmptyString() noexcept +inline NSString* nsEmptyString() noexcept { return [NSString string]; } -static inline NSURL* createNSURLFromFile (const String& f) +inline NSURL* createNSURLFromFile (const String& f) { return [NSURL fileURLWithPath: juceStringToNS (f)]; } -static inline NSURL* createNSURLFromFile (const File& f) +inline NSURL* createNSURLFromFile (const File& f) { return createNSURLFromFile (f.getFullPathName()); } -static inline NSArray* createNSArrayFromStringArray (const StringArray& strings) +inline NSArray* createNSArrayFromStringArray (const StringArray& strings) { auto array = [[NSMutableArray alloc] init]; @@ -67,9 +67,9 @@ static inline NSArray* createNSArrayFromStringArray (const StringArray& strings) return [array autorelease]; } -static NSArray* varArrayToNSArray (const var& varToParse); +inline NSArray* varArrayToNSArray (const var& varToParse); -static NSDictionary* varObjectToNSDictionary (const var& varToParse) +inline NSDictionary* varObjectToNSDictionary (const var& varToParse) { auto dictionary = [NSMutableDictionary dictionary]; @@ -109,7 +109,7 @@ static NSDictionary* varObjectToNSDictionary (const var& varToParse) return dictionary; } -static NSArray* varArrayToNSArray (const var& varToParse) +inline NSArray* varArrayToNSArray (const var& varToParse) { jassert (varToParse.isArray()); @@ -145,9 +145,9 @@ static NSArray* varArrayToNSArray (const var& varToParse) return array; } -static var nsObjectToVar (NSObject* array); +var nsObjectToVar (NSObject* array); -static var nsDictionaryToVar (NSDictionary* dictionary) +inline var nsDictionaryToVar (NSDictionary* dictionary) { DynamicObject::Ptr dynamicObject (new DynamicObject()); @@ -157,7 +157,7 @@ static var nsDictionaryToVar (NSDictionary* dictionary) return var (dynamicObject.get()); } -static var nsArrayToVar (NSArray* array) +inline var nsArrayToVar (NSArray* array) { Array resultArray; @@ -167,7 +167,7 @@ static var nsArrayToVar (NSArray* array) return var (resultArray); } -static var nsObjectToVar (NSObject* obj) +inline var nsObjectToVar (NSObject* obj) { if ([obj isKindOfClass: [NSString class]]) return nsStringToJuce ((NSString*) obj); else if ([obj isKindOfClass: [NSNumber class]]) return nsStringToJuce ([(NSNumber*) obj stringValue]); @@ -184,7 +184,7 @@ static var nsObjectToVar (NSObject* obj) #if JUCE_MAC template -static NSRect makeNSRect (const RectangleType& r) noexcept +NSRect makeNSRect (const RectangleType& r) noexcept { return NSMakeRect (static_cast (r.getX()), static_cast (r.getY()), @@ -198,7 +198,7 @@ static NSRect makeNSRect (const RectangleType& r) noexcept // depending on the argument type. The re-cast objc_msgSendSuper to a function // take the same arguments as the target method. template -static inline ReturnValue ObjCMsgSendSuper (struct objc_super* s, SEL sel, Params... params) +ReturnValue ObjCMsgSendSuper (struct objc_super* s, SEL sel, Params... params) { using SuperFn = ReturnValue (*)(struct objc_super*, SEL, Params...); SuperFn fn = reinterpret_cast (objc_msgSendSuper); @@ -207,11 +207,11 @@ static inline ReturnValue ObjCMsgSendSuper (struct objc_super* s, SEL sel, Param // These hacks are a workaround for newer Xcode builds which by default prevent calls to these objc functions.. typedef id (*MsgSendSuperFn) (struct objc_super*, SEL, ...); -static inline MsgSendSuperFn getMsgSendSuperFn() noexcept { return (MsgSendSuperFn) (void*) objc_msgSendSuper; } +inline MsgSendSuperFn getMsgSendSuperFn() noexcept { return (MsgSendSuperFn) (void*) objc_msgSendSuper; } #if ! JUCE_IOS typedef double (*MsgSendFPRetFn) (id, SEL op, ...); -static inline MsgSendFPRetFn getMsgSendFPRetFn() noexcept { return (MsgSendFPRetFn) (void*) objc_msgSend_fpret; } +inline MsgSendFPRetFn getMsgSendFPRetFn() noexcept { return (MsgSendFPRetFn) (void*) objc_msgSend_fpret; } #endif #endif diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index 93250b2ea6..982db865bb 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -1033,7 +1033,8 @@ void* DynamicLibrary::getFunction (const String& functionName) noexcept //============================================================================== -static inline String readPosixConfigFileValue (const char* file, const char* key) +#if JUCE_LINUX || JUCE_ANDROID +static String readPosixConfigFileValue (const char* file, const char* key) { StringArray lines; File (file).readLines (lines); @@ -1044,6 +1045,7 @@ static inline String readPosixConfigFileValue (const char* file, const char* key return {}; } +#endif //============================================================================== diff --git a/modules/juce_core/streams/juce_BufferedInputStream.cpp b/modules/juce_core/streams/juce_BufferedInputStream.cpp index 577f4f7a78..ddc2d23fb9 100644 --- a/modules/juce_core/streams/juce_BufferedInputStream.cpp +++ b/modules/juce_core/streams/juce_BufferedInputStream.cpp @@ -23,7 +23,7 @@ namespace juce { -static inline int calcBufferStreamBufferSize (int requestedSize, InputStream* source) noexcept +static int calcBufferStreamBufferSize (int requestedSize, InputStream* source) noexcept { // You need to supply a real stream when creating a BufferedInputStream jassert (source != nullptr); diff --git a/modules/juce_core/text/juce_CharPointer_ASCII.h b/modules/juce_core/text/juce_CharPointer_ASCII.h index 3314318b2b..597d6f2f82 100644 --- a/modules/juce_core/text/juce_CharPointer_ASCII.h +++ b/modules/juce_core/text/juce_CharPointer_ASCII.h @@ -182,7 +182,7 @@ public: /** Returns the number of bytes that would be needed to represent the given unicode character in this encoding format. */ - static inline size_t getBytesRequiredFor (const juce_wchar) noexcept + static size_t getBytesRequiredFor (const juce_wchar) noexcept { return 1; } diff --git a/modules/juce_core/text/juce_CharPointer_UTF32.h b/modules/juce_core/text/juce_CharPointer_UTF32.h index 43ca9927be..da66024bf6 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF32.h +++ b/modules/juce_core/text/juce_CharPointer_UTF32.h @@ -186,7 +186,7 @@ public: /** Returns the number of bytes that would be needed to represent the given unicode character in this encoding format. */ - static inline size_t getBytesRequiredFor (juce_wchar) noexcept + static size_t getBytesRequiredFor (juce_wchar) noexcept { return sizeof (CharType); } diff --git a/modules/juce_core/text/juce_CharacterFunctions.h b/modules/juce_core/text/juce_CharacterFunctions.h index f713afb647..12bd7a05cc 100644 --- a/modules/juce_core/text/juce_CharacterFunctions.h +++ b/modules/juce_core/text/juce_CharacterFunctions.h @@ -551,7 +551,7 @@ public: } /** Compares two characters. */ - static inline int compare (juce_wchar char1, juce_wchar char2) noexcept + static int compare (juce_wchar char1, juce_wchar char2) noexcept { if (auto diff = static_cast (char1) - static_cast (char2)) return diff < 0 ? -1 : 1; @@ -596,7 +596,7 @@ public: } /** Compares two characters, using a case-independant match. */ - static inline int compareIgnoreCase (juce_wchar char1, juce_wchar char2) noexcept + static int compareIgnoreCase (juce_wchar char1, juce_wchar char2) noexcept { return char1 != char2 ? compare (toUpperCase (char1), toUpperCase (char2)) : 0; } diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index f67a3abef0..4d1ff2aa04 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -39,7 +39,7 @@ NewLine newLine; using CharPointer_wchar_t = CharPointer_UTF32; #endif -static inline CharPointer_wchar_t castToCharPointer_wchar_t (const void* t) noexcept +static CharPointer_wchar_t castToCharPointer_wchar_t (const void* t) noexcept { return CharPointer_wchar_t (static_cast (t)); } @@ -157,7 +157,7 @@ public: ++(b->refCount); } - static inline void release (StringHolder* const b) noexcept + static void release (StringHolder* const b) noexcept { if (! isEmptyString (b)) if (--(b->refCount) == -1) @@ -169,7 +169,7 @@ public: release (bufferFromText (text)); } - static inline int getReferenceCount (const CharPointerType text) noexcept + static int getReferenceCount (const CharPointerType text) noexcept { return bufferFromText (text)->refCount.get() + 1; } @@ -207,14 +207,14 @@ public: CharType text[1]; private: - static inline StringHolder* bufferFromText (const CharPointerType text) noexcept + static StringHolder* bufferFromText (const CharPointerType text) noexcept { // (Can't use offsetof() here because of warnings about this not being a POD) return reinterpret_cast (reinterpret_cast (text.getAddress()) - (reinterpret_cast (reinterpret_cast (128)->text) - 128)); } - static inline bool isEmptyString (StringHolder* other) + static bool isEmptyString (StringHolder* other) { return (other->refCount.get() & 0x30000000) != 0; } diff --git a/modules/juce_core/time/juce_Time.cpp b/modules/juce_core/time/juce_Time.cpp index ec661624e1..ca1c2653a7 100644 --- a/modules/juce_core/time/juce_Time.cpp +++ b/modules/juce_core/time/juce_Time.cpp @@ -91,7 +91,7 @@ namespace TimeHelpers : (value - ((value / modulo) + 1) * modulo)); } - static inline String formatString (const String& format, const std::tm* const tm) + static String formatString (const String& format, const std::tm* const tm) { #if JUCE_ANDROID using StringType = CharPointer_UTF8; @@ -126,12 +126,12 @@ namespace TimeHelpers } //============================================================================== - static inline bool isLeapYear (int year) noexcept + static bool isLeapYear (int year) noexcept { return (year % 400 == 0) || ((year % 100 != 0) && (year % 4 == 0)); } - static inline int daysFromJan1 (int year, int month) noexcept + static int daysFromJan1 (int year, int month) noexcept { const short dayOfYear[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 }; @@ -139,18 +139,18 @@ namespace TimeHelpers return dayOfYear [(isLeapYear (year) ? 12 : 0) + month]; } - static inline int64 daysFromYear0 (int year) noexcept + static int64 daysFromYear0 (int year) noexcept { --year; return 365 * year + (year / 400) - (year / 100) + (year / 4); } - static inline int64 daysFrom1970 (int year) noexcept + static int64 daysFrom1970 (int year) noexcept { return daysFromYear0 (year) - daysFromYear0 (1970); } - static inline int64 daysFrom1970 (int year, int month) noexcept + static int64 daysFrom1970 (int year, int month) noexcept { if (month > 11) { @@ -169,7 +169,7 @@ namespace TimeHelpers // There's no posix function that does a UTC version of mktime, // so annoyingly we need to implement this manually.. - static inline int64 mktime_utc (const std::tm& t) noexcept + static int64 mktime_utc (const std::tm& t) noexcept { return 24 * 3600 * (daysFrom1970 (t.tm_year + 1900, t.tm_mon) + (t.tm_mday - 1)) + 3600 * t.tm_hour diff --git a/modules/juce_core/xml/juce_XmlElement.cpp b/modules/juce_core/xml/juce_XmlElement.cpp index 4000f7fbd0..668c8c7a45 100644 --- a/modules/juce_core/xml/juce_XmlElement.cpp +++ b/modules/juce_core/xml/juce_XmlElement.cpp @@ -23,7 +23,7 @@ namespace juce { -inline static bool isValidXmlNameStartCharacter (juce_wchar character) noexcept +static bool isValidXmlNameStartCharacter (juce_wchar character) noexcept { return character == ':' || character == '_' @@ -43,7 +43,7 @@ inline static bool isValidXmlNameStartCharacter (juce_wchar character) noexcept || (character >= 0x10000 && character <= 0xeffff); } -inline static bool isValidXmlNameBodyCharacter (juce_wchar character) noexcept +static bool isValidXmlNameBodyCharacter (juce_wchar character) noexcept { return isValidXmlNameStartCharacter (character) || character == '-' diff --git a/modules/juce_cryptography/hashing/juce_MD5.cpp b/modules/juce_cryptography/hashing/juce_MD5.cpp index fcee841a58..bb22e7751c 100644 --- a/modules/juce_cryptography/hashing/juce_MD5.cpp +++ b/modules/juce_cryptography/hashing/juce_MD5.cpp @@ -147,12 +147,12 @@ private: #endif } - static inline uint32_t rotateLeft (uint32_t x, uint32_t n) noexcept { return (x << n) | (x >> (32 - n)); } + static uint32_t rotateLeft (uint32_t x, uint32_t n) noexcept { return (x << n) | (x >> (32 - n)); } - static inline uint32_t F (uint32_t x, uint32_t y, uint32_t z) noexcept { return (x & y) | (~x & z); } - static inline uint32_t G (uint32_t x, uint32_t y, uint32_t z) noexcept { return (x & z) | (y & ~z); } - static inline uint32_t H (uint32_t x, uint32_t y, uint32_t z) noexcept { return x ^ y ^ z; } - static inline uint32_t I (uint32_t x, uint32_t y, uint32_t z) noexcept { return y ^ (x | ~z); } + static uint32_t F (uint32_t x, uint32_t y, uint32_t z) noexcept { return (x & y) | (~x & z); } + static uint32_t G (uint32_t x, uint32_t y, uint32_t z) noexcept { return (x & z) | (y & ~z); } + static uint32_t H (uint32_t x, uint32_t y, uint32_t z) noexcept { return x ^ y ^ z; } + static uint32_t I (uint32_t x, uint32_t y, uint32_t z) noexcept { return y ^ (x | ~z); } static void FF (uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac) noexcept { diff --git a/modules/juce_cryptography/hashing/juce_SHA256.cpp b/modules/juce_cryptography/hashing/juce_SHA256.cpp index 438dbb03ec..7ee760b4d8 100644 --- a/modules/juce_cryptography/hashing/juce_SHA256.cpp +++ b/modules/juce_cryptography/hashing/juce_SHA256.cpp @@ -131,14 +131,14 @@ private: 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 }; uint64_t length = 0; - static inline uint32_t rotate (uint32_t x, uint32_t y) noexcept { return (x >> y) | (x << (32 - y)); } - static inline uint32_t ch (uint32_t x, uint32_t y, uint32_t z) noexcept { return z ^ ((y ^ z) & x); } - static inline uint32_t maj (uint32_t x, uint32_t y, uint32_t z) noexcept { return y ^ ((y ^ z) & (x ^ y)); } - - static inline uint32_t s0 (uint32_t x) noexcept { return rotate (x, 7) ^ rotate (x, 18) ^ (x >> 3); } - static inline uint32_t s1 (uint32_t x) noexcept { return rotate (x, 17) ^ rotate (x, 19) ^ (x >> 10); } - static inline uint32_t S0 (uint32_t x) noexcept { return rotate (x, 2) ^ rotate (x, 13) ^ rotate (x, 22); } - static inline uint32_t S1 (uint32_t x) noexcept { return rotate (x, 6) ^ rotate (x, 11) ^ rotate (x, 25); } + static uint32_t rotate (uint32_t x, uint32_t y) noexcept { return (x >> y) | (x << (32 - y)); } + static uint32_t ch (uint32_t x, uint32_t y, uint32_t z) noexcept { return z ^ ((y ^ z) & x); } + static uint32_t maj (uint32_t x, uint32_t y, uint32_t z) noexcept { return y ^ ((y ^ z) & (x ^ y)); } + + static uint32_t s0 (uint32_t x) noexcept { return rotate (x, 7) ^ rotate (x, 18) ^ (x >> 3); } + static uint32_t s1 (uint32_t x) noexcept { return rotate (x, 17) ^ rotate (x, 19) ^ (x >> 10); } + static uint32_t S0 (uint32_t x) noexcept { return rotate (x, 2) ^ rotate (x, 13) ^ rotate (x, 22); } + static uint32_t S1 (uint32_t x) noexcept { return rotate (x, 6) ^ rotate (x, 11) ^ rotate (x, 25); } }; //============================================================================== diff --git a/modules/juce_dsp/containers/juce_SIMDRegister.h b/modules/juce_dsp/containers/juce_SIMDRegister.h index 510724edd0..eefbd0f806 100644 --- a/modules/juce_dsp/containers/juce_SIMDRegister.h +++ b/modules/juce_dsp/containers/juce_SIMDRegister.h @@ -119,14 +119,14 @@ struct SIMDRegister //============================================================================== /** Creates a new SIMDRegister from the corresponding scalar primitive. The scalar is extended to all elements of the vector. */ - inline static SIMDRegister JUCE_VECTOR_CALLTYPE expand (ElementType s) noexcept { return {CmplxOps::expand (s)}; } + static SIMDRegister JUCE_VECTOR_CALLTYPE expand (ElementType s) noexcept { return {CmplxOps::expand (s)}; } /** Creates a new SIMDRegister from the internal SIMD type (for example __mm128 for single-precision floating point on SSE architectures). */ - inline static SIMDRegister JUCE_VECTOR_CALLTYPE fromNative (vSIMDType a) noexcept { return {a}; } + static SIMDRegister JUCE_VECTOR_CALLTYPE fromNative (vSIMDType a) noexcept { return {a}; } /** Creates a new SIMDRegister from the first SIMDNumElements of a scalar array. */ - inline static SIMDRegister JUCE_VECTOR_CALLTYPE fromRawArray (const ElementType* a) noexcept + static SIMDRegister JUCE_VECTOR_CALLTYPE fromRawArray (const ElementType* a) noexcept { jassert (isSIMDAligned (a)); return {CmplxOps::load (a)}; @@ -275,43 +275,43 @@ struct SIMDRegister /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is equal to the corresponding element of b, or zero otherwise. The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ - static inline vMaskType JUCE_VECTOR_CALLTYPE equal (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::equal (a.value, b.value)); } + static vMaskType JUCE_VECTOR_CALLTYPE equal (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::equal (a.value, b.value)); } /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is not equal to the corresponding element of b, or zero otherwise. The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ - static inline vMaskType JUCE_VECTOR_CALLTYPE notEqual (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::notEqual (a.value, b.value)); } + static vMaskType JUCE_VECTOR_CALLTYPE notEqual (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::notEqual (a.value, b.value)); } /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is less than to the corresponding element of b, or zero otherwise. The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ - static inline vMaskType JUCE_VECTOR_CALLTYPE lessThan (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThan (b.value, a.value)); } + static vMaskType JUCE_VECTOR_CALLTYPE lessThan (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThan (b.value, a.value)); } /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is than or equal to the corresponding element of b, or zero otherwise. The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ - static inline vMaskType JUCE_VECTOR_CALLTYPE lessThanOrEqual (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThanOrEqual (b.value, a.value)); } + static vMaskType JUCE_VECTOR_CALLTYPE lessThanOrEqual (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThanOrEqual (b.value, a.value)); } /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is greater than to the corresponding element of b, or zero otherwise. The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ - static inline vMaskType JUCE_VECTOR_CALLTYPE greaterThan (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThan (a.value, b.value)); } + static vMaskType JUCE_VECTOR_CALLTYPE greaterThan (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThan (a.value, b.value)); } /** Returns a SIMDRegister of the corresponding integral type where each element has each bit set if the corresponding element of a is greater than or equal to the corresponding element of b, or zero otherwise. The result can then be used in bit operations defined above to avoid branches in vector SIMD code. */ - static inline vMaskType JUCE_VECTOR_CALLTYPE greaterThanOrEqual (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThanOrEqual (a.value, b.value)); } + static vMaskType JUCE_VECTOR_CALLTYPE greaterThanOrEqual (SIMDRegister a, SIMDRegister b) noexcept { return toMaskType (NativeOps::greaterThanOrEqual (a.value, b.value)); } //============================================================================== /** Returns a new vector where each element is the minimum of the corresponding element of a and b. */ - static inline SIMDRegister JUCE_VECTOR_CALLTYPE min (SIMDRegister a, SIMDRegister b) noexcept { return { NativeOps::min (a.value, b.value) }; } + static SIMDRegister JUCE_VECTOR_CALLTYPE min (SIMDRegister a, SIMDRegister b) noexcept { return { NativeOps::min (a.value, b.value) }; } /** Returns a new vector where each element is the maximum of the corresponding element of a and b. */ - static inline SIMDRegister JUCE_VECTOR_CALLTYPE max (SIMDRegister a, SIMDRegister b) noexcept { return { NativeOps::max (a.value, b.value) }; } + static SIMDRegister JUCE_VECTOR_CALLTYPE max (SIMDRegister a, SIMDRegister b) noexcept { return { NativeOps::max (a.value, b.value) }; } //============================================================================== /** Multiplies b and c and adds the result to a. */ - static inline SIMDRegister JUCE_VECTOR_CALLTYPE multiplyAdd (SIMDRegister a, const SIMDRegister b, SIMDRegister c) noexcept + static SIMDRegister JUCE_VECTOR_CALLTYPE multiplyAdd (SIMDRegister a, const SIMDRegister b, SIMDRegister c) noexcept { return { CmplxOps::muladd (a.value, b.value, c.value) }; } @@ -323,18 +323,18 @@ struct SIMDRegister //============================================================================== /** Truncates each element to its integer part. Effectively discards the fractional part of each element. A.k.a. round to zero. */ - static inline SIMDRegister JUCE_VECTOR_CALLTYPE truncate (SIMDRegister a) noexcept { return { NativeOps::truncate (a.value) }; } + static SIMDRegister JUCE_VECTOR_CALLTYPE truncate (SIMDRegister a) noexcept { return { NativeOps::truncate (a.value) }; } //============================================================================== /** Returns the absolute value of each element. */ - static inline SIMDRegister JUCE_VECTOR_CALLTYPE abs (SIMDRegister a) noexcept + static SIMDRegister JUCE_VECTOR_CALLTYPE abs (SIMDRegister a) noexcept { return a - (a * (expand (ElementType (2)) & lessThan (a, expand (ElementType (0))))); } //============================================================================== /** Checks if the given pointer is sufficiently aligned for using SIMD operations. */ - static inline bool isSIMDAligned (const ElementType* ptr) noexcept + static bool isSIMDAligned (const ElementType* ptr) noexcept { uintptr_t bitmask = SIMDRegisterSize - 1; return (reinterpret_cast (ptr) & bitmask) == 0; @@ -345,13 +345,13 @@ struct SIMDRegister If the current position in memory is already aligned then this method will simply return the pointer. */ - static inline ElementType* getNextSIMDAlignedPtr (ElementType* ptr) noexcept + static ElementType* getNextSIMDAlignedPtr (ElementType* ptr) noexcept { return snapPointerToAlignment (ptr, SIMDRegisterSize); } private: - static inline vMaskType JUCE_VECTOR_CALLTYPE toMaskType (vSIMDType a) noexcept + static vMaskType JUCE_VECTOR_CALLTYPE toMaskType (vSIMDType a) noexcept { union { @@ -363,7 +363,7 @@ private: return vMaskType::fromNative (u.out); } - static inline vSIMDType JUCE_VECTOR_CALLTYPE toVecType (vMaskSIMDType a) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE toVecType (vMaskSIMDType a) noexcept { union { @@ -375,7 +375,7 @@ private: return u.out; } - static inline vSIMDType JUCE_VECTOR_CALLTYPE toVecType (MaskType a) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE toVecType (MaskType a) noexcept { union { diff --git a/modules/juce_dsp/containers/juce_SIMDRegister_Impl.h b/modules/juce_dsp/containers/juce_SIMDRegister_Impl.h index cca51b7a35..57eec70731 100644 --- a/modules/juce_dsp/containers/juce_SIMDRegister_Impl.h +++ b/modules/juce_dsp/containers/juce_SIMDRegister_Impl.h @@ -48,42 +48,42 @@ struct CmplxSIMDOps { using vSIMDType = typename SIMDNativeOps::vSIMDType; - static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const Scalar* a) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE load (const Scalar* a) noexcept { return SIMDNativeOps::load (a); } - static inline void JUCE_VECTOR_CALLTYPE store (vSIMDType value, Scalar* dest) noexcept + static void JUCE_VECTOR_CALLTYPE store (vSIMDType value, Scalar* dest) noexcept { SIMDNativeOps::store (value, dest); } - static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (Scalar s) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE expand (Scalar s) noexcept { return SIMDNativeOps::expand (s); } - static inline Scalar JUCE_VECTOR_CALLTYPE get (vSIMDType v, std::size_t i) noexcept + static Scalar JUCE_VECTOR_CALLTYPE get (vSIMDType v, std::size_t i) noexcept { return SIMDNativeOps::get (v, i); } - static inline vSIMDType JUCE_VECTOR_CALLTYPE set (vSIMDType v, std::size_t i, Scalar s) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE set (vSIMDType v, std::size_t i, Scalar s) noexcept { return SIMDNativeOps::set (v, i, s); } - static inline Scalar JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept + static Scalar JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept { return SIMDNativeOps::sum (a); } - static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept { return SIMDNativeOps::mul (a, b); } - static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return SIMDNativeOps::multiplyAdd (a, b, c); } @@ -95,17 +95,17 @@ struct CmplxSIMDOps> { using vSIMDType = typename SIMDNativeOps::vSIMDType; - static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const std::complex* a) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE load (const std::complex* a) noexcept { return SIMDNativeOps::load (reinterpret_cast (a)); } - static inline void JUCE_VECTOR_CALLTYPE store (vSIMDType value, std::complex* dest) noexcept + static void JUCE_VECTOR_CALLTYPE store (vSIMDType value, std::complex* dest) noexcept { SIMDNativeOps::store (value, reinterpret_cast (dest)); } - static inline vSIMDType JUCE_VECTOR_CALLTYPE expand (std::complex s) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE expand (std::complex s) noexcept { const int n = sizeof (vSIMDType) / sizeof (Scalar); @@ -121,31 +121,31 @@ struct CmplxSIMDOps> return u.v; } - static inline std::complex JUCE_VECTOR_CALLTYPE get (vSIMDType v, std::size_t i) noexcept + static std::complex JUCE_VECTOR_CALLTYPE get (vSIMDType v, std::size_t i) noexcept { auto j = i << 1; return std::complex (SIMDNativeOps::get (v, j), SIMDNativeOps::get (v, j + 1)); } - static inline vSIMDType JUCE_VECTOR_CALLTYPE set (vSIMDType v, std::size_t i, std::complex s) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE set (vSIMDType v, std::size_t i, std::complex s) noexcept { auto j = i << 1; return SIMDNativeOps::set (SIMDNativeOps::set (v, j, s.real()), j + 1, s.imag()); } - static inline std::complex JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept + static std::complex JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept { vSIMDType result = SIMDNativeOps::oddevensum (a); auto* ptr = reinterpret_cast (&result); return std::complex (ptr[0], ptr[1]); } - static inline vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE mul (vSIMDType a, vSIMDType b) noexcept { return SIMDNativeOps::cmplxmul (a, b); } - static inline vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept + static vSIMDType JUCE_VECTOR_CALLTYPE muladd (vSIMDType a, vSIMDType b, vSIMDType c) noexcept { return SIMDNativeOps::add (a, SIMDNativeOps::cmplxmul (b, c)); } diff --git a/modules/juce_dsp/frequency/juce_Windowing.cpp b/modules/juce_dsp/frequency/juce_Windowing.cpp index cf29243d1f..418ae1dc8c 100644 --- a/modules/juce_dsp/frequency/juce_Windowing.cpp +++ b/modules/juce_dsp/frequency/juce_Windowing.cpp @@ -22,7 +22,7 @@ namespace dsp { template -static inline FloatType ncos (size_t order, size_t i, size_t size) noexcept +static FloatType ncos (size_t order, size_t i, size_t size) noexcept { return std::cos (static_cast (order * i) * MathConstants::pi / static_cast (size - 1)); diff --git a/modules/juce_dsp/maths/juce_Matrix.h b/modules/juce_dsp/maths/juce_Matrix.h index e9c250ed8f..d15adaec0e 100644 --- a/modules/juce_dsp/maths/juce_Matrix.h +++ b/modules/juce_dsp/maths/juce_Matrix.h @@ -157,7 +157,7 @@ public: inline Matrix& hadarmard (const Matrix& other) noexcept { return apply (other, [] (ElementType a, ElementType b) { return a * b; } ); } /** Does a hadarmard product with a and b returns the result. */ - static inline Matrix hadarmard (const Matrix& a, const Matrix& b) { Matrix result (a); result.hadarmard (b); return result; } + static Matrix hadarmard (const Matrix& a, const Matrix& b) { Matrix result (a); result.hadarmard (b); return result; } //============================================================================== /** Compare to matrices with a given tolerance */ diff --git a/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp b/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp index 9693c224b3..5ca5a81104 100644 --- a/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp +++ b/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp @@ -30,7 +30,7 @@ static const char* killMessage = "__ipc_k_"; static const char* pingMessage = "__ipc_p_"; enum { specialMessageSize = 8, defaultTimeoutMs = 8000 }; -static inline bool isMessageType (const MemoryBlock& mb, const char* messageType) noexcept +static bool isMessageType (const MemoryBlock& mb, const char* messageType) noexcept { return mb.matches (messageType, (size_t) specialMessageSize); } diff --git a/modules/juce_events/timers/juce_Timer.cpp b/modules/juce_events/timers/juce_Timer.cpp index c33540ef66..593dc3e032 100644 --- a/modules/juce_events/timers/juce_Timer.cpp +++ b/modules/juce_events/timers/juce_Timer.cpp @@ -136,7 +136,7 @@ public: callTimers(); } - static inline void add (Timer* tim) noexcept + static void add (Timer* tim) noexcept { if (instance == nullptr) instance = new TimerThread(); @@ -144,13 +144,13 @@ public: instance->addTimer (tim); } - static inline void remove (Timer* tim) noexcept + static void remove (Timer* tim) noexcept { if (instance != nullptr) instance->removeTimer (tim); } - static inline void resetCounter (Timer* tim) noexcept + static void resetCounter (Timer* tim) noexcept { if (instance != nullptr) instance->resetTimerCounter (tim); diff --git a/modules/juce_graphics/effects/juce_DropShadowEffect.cpp b/modules/juce_graphics/effects/juce_DropShadowEffect.cpp index 33621b25ac..ed6797b17d 100644 --- a/modules/juce_graphics/effects/juce_DropShadowEffect.cpp +++ b/modules/juce_graphics/effects/juce_DropShadowEffect.cpp @@ -19,7 +19,7 @@ namespace juce { -static inline void blurDataTriplets (uint8* d, int num, const int delta) noexcept +static void blurDataTriplets (uint8* d, int num, const int delta) noexcept { uint32 last = d[0]; d[0] = (uint8) ((d[0] + d[delta] + 1) / 3); diff --git a/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp b/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp index 2df21a66b7..3c1f0c68ce 100644 --- a/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp +++ b/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp @@ -33,7 +33,7 @@ PositionedGlyph::PositionedGlyph (const Font& font_, juce_wchar character_, int PositionedGlyph::~PositionedGlyph() {} -static inline void drawGlyphWithFont (Graphics& g, int glyph, const Font& font, AffineTransform t) +static void drawGlyphWithFont (Graphics& g, int glyph, const Font& font, AffineTransform t) { auto& context = g.getInternalContext(); context.setFont (font); @@ -536,7 +536,7 @@ void GlyphArrangement::spreadOutLine (int start, int num, float targetWidth) } } -static inline bool isBreakableGlyph (const PositionedGlyph& g) noexcept +static bool isBreakableGlyph (const PositionedGlyph& g) noexcept { return g.isWhitespace() || g.getCharacter() == '-'; } diff --git a/modules/juce_graphics/geometry/juce_Path.cpp b/modules/juce_graphics/geometry/juce_Path.cpp index 111db02cc0..10bc107355 100644 --- a/modules/juce_graphics/geometry/juce_Path.cpp +++ b/modules/juce_graphics/geometry/juce_Path.cpp @@ -60,7 +60,7 @@ const float Path::closeSubPathMarker = 100005.0f; const float Path::defaultToleranceForTesting = 1.0f; const float Path::defaultToleranceForMeasurement = 0.6f; -static inline bool isMarker (float value, float marker) noexcept +static bool isMarker (float value, float marker) noexcept { return value == marker; } diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index f0095c79b3..04c46ed077 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -278,7 +278,7 @@ struct Component::ComponentHelpers } //============================================================================== - static inline bool hitTest (Component& comp, Point localPoint) + static bool hitTest (Component& comp, Point localPoint) { return isPositiveAndBelow (localPoint.x, comp.getWidth()) && isPositiveAndBelow (localPoint.y, comp.getHeight()) diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index 1cae60c45f..371619fc9d 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -396,7 +396,7 @@ static void setDPIAwareness() setProcessDPIAware(); } -static inline bool isPerMonitorDPIAwareProcess() +static bool isPerMonitorDPIAwareProcess() { #if JUCE_WIN_PER_MONITOR_DPI_AWARE static bool dpiAware = []() -> bool @@ -418,7 +418,7 @@ static inline bool isPerMonitorDPIAwareProcess() #endif } -static inline bool isPerMonitorDPIAwareWindow (HWND h) +static bool isPerMonitorDPIAwareWindow (HWND h) { #if JUCE_WIN_PER_MONITOR_DPI_AWARE jassert (h != nullptr); @@ -435,7 +435,7 @@ static inline bool isPerMonitorDPIAwareWindow (HWND h) #endif } -static inline bool isPerMonitorDPIAwareThread() +static bool isPerMonitorDPIAwareThread() { #if JUCE_WIN_PER_MONITOR_DPI_AWARE setDPIAwareness(); diff --git a/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp b/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp index f752fb1662..0f44bae2db 100644 --- a/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp +++ b/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp @@ -743,7 +743,7 @@ bool CodeDocument::hasChangedSinceSavePoint() const noexcept } //============================================================================== -static inline int getCharacterType (juce_wchar character) noexcept +static int getCharacterType (juce_wchar character) noexcept { return (CharacterFunctions::isLetterOrDigit (character) || character == '_') ? 2 : (CharacterFunctions::isWhitespace (character) ? 0 : 1); diff --git a/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp b/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp index 06c297134c..4c52fc48fb 100644 --- a/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp +++ b/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp @@ -175,7 +175,7 @@ namespace ActiveXHelpers //============================================================================== static Array activeXComps; - static inline HWND getHWND (const ActiveXControlComponent* const component) + static HWND getHWND (const ActiveXControlComponent* const component) { HWND hwnd = {}; const IID iid = __uuidof (IOleWindow); @@ -189,7 +189,7 @@ namespace ActiveXHelpers return hwnd; } - static inline void offerActiveXMouseEventToPeer (ComponentPeer* peer, HWND hwnd, UINT message, LPARAM lParam) + static void offerActiveXMouseEventToPeer (ComponentPeer* peer, HWND hwnd, UINT message, LPARAM lParam) { switch (message) { diff --git a/modules/juce_opengl/native/juce_OpenGLExtensions.h b/modules/juce_opengl/native/juce_OpenGLExtensions.h index 36cb41e775..073a0dbf9b 100644 --- a/modules/juce_opengl/native/juce_OpenGLExtensions.h +++ b/modules/juce_opengl/native/juce_OpenGLExtensions.h @@ -129,19 +129,19 @@ struct OpenGLExtensionFunctions //============================================================================== #else - #define JUCE_DECLARE_GL_FUNCTION(name, returnType, params, callparams) inline static returnType name params noexcept { return ::name callparams; } + #define JUCE_DECLARE_GL_FUNCTION(name, returnType, params, callparams) static returnType name params noexcept { return ::name callparams; } JUCE_GL_BASE_FUNCTIONS (JUCE_DECLARE_GL_FUNCTION) #ifndef GL3_PROTOTYPES #undef JUCE_DECLARE_GL_FUNCTION - #define JUCE_DECLARE_GL_FUNCTION(name, returnType, params, callparams) inline static returnType name params noexcept { return ::name ## EXT callparams; } + #define JUCE_DECLARE_GL_FUNCTION(name, returnType, params, callparams) static returnType name params noexcept { return ::name ## EXT callparams; } #endif JUCE_GL_EXTENSION_FUNCTIONS (JUCE_DECLARE_GL_FUNCTION) #if JUCE_OPENGL3 #ifndef GL3_PROTOTYPES #undef JUCE_DECLARE_GL_FUNCTION - #define JUCE_DECLARE_GL_FUNCTION(name, returnType, params, callparams) inline static returnType name params noexcept { return ::name ## APPLE callparams; } + #define JUCE_DECLARE_GL_FUNCTION(name, returnType, params, callparams) static returnType name params noexcept { return ::name ## APPLE callparams; } #endif JUCE_GL_VERTEXBUFFER_FUNCTIONS (JUCE_DECLARE_GL_FUNCTION) #endif diff --git a/modules/juce_product_unlocking/marketplace/juce_KeyFileGeneration.h b/modules/juce_product_unlocking/marketplace/juce_KeyFileGeneration.h index 6e6f4ff9d1..b55092b8d1 100644 --- a/modules/juce_product_unlocking/marketplace/juce_KeyFileGeneration.h +++ b/modules/juce_product_unlocking/marketplace/juce_KeyFileGeneration.h @@ -75,7 +75,7 @@ public: unlocker MyGreatApp Joe_Bloggs joebloggs@foobar.com 1234abcd,95432ff 22d9aec92d986dd1,923ad49e9e7ff294c */ - static inline int keyGenerationAppMain (int argc, char* argv[]) + static int keyGenerationAppMain (int argc, char* argv[]) { StringArray args; for (int i = 1; i < argc; ++i)