mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Tidied up some template statement whitespace
This commit is contained in:
parent
d7358d0ef1
commit
46f5b126d5
29 changed files with 58 additions and 58 deletions
|
|
@ -353,8 +353,8 @@ namespace FloatVectorHelpers
|
|||
union signMask64 { double d; uint64 i; };
|
||||
|
||||
#if JUCE_USE_SSE_INTRINSICS || JUCE_USE_ARM_NEON
|
||||
template<int typeSize> struct ModeType { using Mode = BasicOps32; };
|
||||
template<> struct ModeType<8> { using Mode = BasicOps64; };
|
||||
template <int typeSize> struct ModeType { using Mode = BasicOps32; };
|
||||
template <> struct ModeType<8> { using Mode = BasicOps64; };
|
||||
|
||||
template <typename Mode>
|
||||
struct MinMax
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ public:
|
|||
|
||||
@see getNextSample
|
||||
*/
|
||||
template<typename FloatType>
|
||||
template <typename FloatType>
|
||||
void applyEnvelopeToBuffer (AudioBuffer<FloatType>& buffer, int startSample, int numSamples)
|
||||
{
|
||||
jassert (startSample + numSamples <= buffer.getNumSamples());
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
template<typename InterpolatorType>
|
||||
template <typename InterpolatorType>
|
||||
void runInterplatorTests (const String& interpolatorName)
|
||||
{
|
||||
auto createGaussian = [] (std::vector<float>& destination, float scale, float centreInSamples, float width)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ struct LagrangeResampleHelper
|
|||
static forcedinline void calc (float& a, float b) noexcept { a *= b * (1.0f / k); }
|
||||
};
|
||||
|
||||
template<>
|
||||
template <>
|
||||
struct LagrangeResampleHelper<0>
|
||||
{
|
||||
static forcedinline void calc (float&, float) noexcept {}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace juce
|
|||
|
||||
template <typename OboeDataFormat> struct OboeAudioIODeviceBufferHelpers {};
|
||||
|
||||
template<>
|
||||
template <>
|
||||
struct OboeAudioIODeviceBufferHelpers<int16>
|
||||
{
|
||||
static oboe::AudioFormat oboeAudioFormat() { return oboe::AudioFormat::I16; }
|
||||
|
|
@ -71,7 +71,7 @@ struct OboeAudioIODeviceBufferHelpers<int16>
|
|||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
template <>
|
||||
struct OboeAudioIODeviceBufferHelpers<float>
|
||||
{
|
||||
static oboe::AudioFormat oboeAudioFormat() { return oboe::AudioFormat::Float; }
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ private:
|
|||
};
|
||||
|
||||
//==============================================================================
|
||||
template<class WrapperType>
|
||||
template <class WrapperType>
|
||||
struct Win32MidiDeviceQuery
|
||||
{
|
||||
static Array<MidiDeviceInfo> getAvailableDevices()
|
||||
|
|
@ -891,7 +891,7 @@ private:
|
|||
watcher = nullptr;
|
||||
}
|
||||
|
||||
template<typename InfoType>
|
||||
template <typename InfoType>
|
||||
IInspectable* getValueFromDeviceInfo (String key, InfoType* info)
|
||||
{
|
||||
__FIMapView_2_HSTRING_IInspectable* properties;
|
||||
|
|
|
|||
|
|
@ -886,7 +886,7 @@ public:
|
|||
reservoirWritePos = 0;
|
||||
}
|
||||
|
||||
template<class SourceType>
|
||||
template <class SourceType>
|
||||
void updateFormatWithType (SourceType*) noexcept
|
||||
{
|
||||
using NativeType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::NonConst>;
|
||||
|
|
@ -1046,7 +1046,7 @@ public:
|
|||
renderClient = nullptr;
|
||||
}
|
||||
|
||||
template<class DestType>
|
||||
template <class DestType>
|
||||
void updateFormatWithType (DestType*)
|
||||
{
|
||||
using NativeType = AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const>;
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ struct UnityAudioEffectState
|
|||
|
||||
UnityAudioAmbisonicData* ambisonicData;
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
inline T* getEffectData() const
|
||||
{
|
||||
jassert (effectData != nullptr);
|
||||
|
|
|
|||
|
|
@ -3345,7 +3345,7 @@ private:
|
|||
std::vector<std::unique_ptr<ClassEntry>> classes;
|
||||
|
||||
//==============================================================================
|
||||
template<class PClassInfoType>
|
||||
template <class PClassInfoType>
|
||||
tresult PLUGIN_API getPClassInfo (Steinberg::int32 index, PClassInfoType* info)
|
||||
{
|
||||
if (info != nullptr)
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ public:
|
|||
virtual void setDataBits (uint32 startBit, uint32 numBits, uint32 value) = 0;
|
||||
|
||||
/** Sets a single, 32 bit or less, value on the littlefoot heap. */
|
||||
template<typename Type>
|
||||
template <typename Type>
|
||||
void setData (uint32 offset, Type value)
|
||||
{
|
||||
const auto numBytes = sizeof (Type);
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ private:
|
|||
return false;
|
||||
}
|
||||
|
||||
template<typename PacketBuildFn>
|
||||
template <typename PacketBuildFn>
|
||||
void buildAndSendPacket (PacketBuildFn buildFn)
|
||||
{
|
||||
if (deviceConnection == nullptr)
|
||||
|
|
|
|||
|
|
@ -1067,7 +1067,7 @@ private:
|
|||
bool matchesAnyType() const noexcept { return matchesAny (Token::int_, Token::float_, Token::bool_); }
|
||||
bool matchesAnyTypeOrVoid() const noexcept { return matchesAnyType() || currentType == Token::void_; }
|
||||
ExpPtr matchCloseParen (ExpPtr e) { match (Token::closeParen); return e; }
|
||||
template<typename ExpType> ExpType matchEndOfStatement (ExpType e) { match (Token::semicolon); return e; }
|
||||
template <typename ExpType> ExpType matchEndOfStatement (ExpType e) { match (Token::semicolon); return e; }
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -768,7 +768,7 @@ private:
|
|||
sendCommandMessage (BlocksProtocol::saveProgramAsDefault);
|
||||
}
|
||||
|
||||
template<int packetBytes, typename PacketBuilderFn>
|
||||
template <int packetBytes, typename PacketBuilderFn>
|
||||
bool buildAndSendPacket (PacketBuilderFn buildFn)
|
||||
{
|
||||
auto index = getDeviceIndex();
|
||||
|
|
|
|||
|
|
@ -314,25 +314,25 @@ private:
|
|||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AbstractFifo)
|
||||
};
|
||||
|
||||
template<>
|
||||
template <>
|
||||
inline void AbstractFifo::ScopedReadWrite<AbstractFifo::ReadOrWrite::read>::finish (AbstractFifo& f, int num) noexcept
|
||||
{
|
||||
f.finishedRead (num);
|
||||
}
|
||||
|
||||
template<>
|
||||
template <>
|
||||
inline void AbstractFifo::ScopedReadWrite<AbstractFifo::ReadOrWrite::write>::finish (AbstractFifo& f, int num) noexcept
|
||||
{
|
||||
f.finishedWrite (num);
|
||||
}
|
||||
|
||||
template<>
|
||||
template <>
|
||||
inline void AbstractFifo::ScopedReadWrite<AbstractFifo::ReadOrWrite::read>::prepare (AbstractFifo& f, int num) noexcept
|
||||
{
|
||||
f.prepareToRead (num, startIndex1, blockSize1, startIndex2, blockSize2);
|
||||
}
|
||||
|
||||
template<>
|
||||
template <>
|
||||
inline void AbstractFifo::ScopedReadWrite<AbstractFifo::ReadOrWrite::write>::prepare (AbstractFifo& f, int num) noexcept
|
||||
{
|
||||
f.prepareToWrite (num, startIndex1, blockSize1, startIndex2, blockSize2);
|
||||
|
|
|
|||
|
|
@ -562,7 +562,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
template<typename A, typename B>
|
||||
template <typename A, typename B>
|
||||
void checkEqual (const ArrayBase<A, DummyCriticalSection>& a,
|
||||
const ArrayBase<B, DummyCriticalSection>& b)
|
||||
{
|
||||
|
|
@ -572,7 +572,7 @@ private:
|
|||
expect (a[i] == b[i]);
|
||||
}
|
||||
|
||||
template<typename A, typename B>
|
||||
template <typename A, typename B>
|
||||
void checkEqual (ArrayBase<A, DummyCriticalSection>& a,
|
||||
std::vector<B>& b)
|
||||
{
|
||||
|
|
@ -582,7 +582,7 @@ private:
|
|||
expect (a[i] == b[(size_t) i]);
|
||||
}
|
||||
|
||||
template<typename A, typename B, typename C>
|
||||
template <typename A, typename B, typename C>
|
||||
void checkEqual (ArrayBase<A, DummyCriticalSection>& a,
|
||||
ArrayBase<B, DummyCriticalSection>& b,
|
||||
std::vector<C>& c)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace HeapBlockHelper
|
|||
template <bool shouldThrow>
|
||||
struct ThrowOnFail { static void checkPointer (void*) {} };
|
||||
|
||||
template<>
|
||||
template <>
|
||||
struct ThrowOnFail<true> { static void checkPointer (void* data) { if (data == nullptr) throw std::bad_alloc(); } };
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ NSRect makeNSRect (const RectangleType& r) noexcept
|
|||
#endif
|
||||
};
|
||||
|
||||
template<>
|
||||
template <>
|
||||
struct NeedsStret<void> { static constexpr auto value = false; };
|
||||
|
||||
template <typename T, bool b = NeedsStret<T>::value>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace juce
|
|||
#undef __uuidof
|
||||
#endif
|
||||
|
||||
template<typename Type> struct UUIDGetter { static CLSID get() { jassertfalse; return {}; } };
|
||||
template <typename Type> struct UUIDGetter { static CLSID get() { jassertfalse; return {}; } };
|
||||
#define __uuidof(x) UUIDGetter<x>::get()
|
||||
|
||||
template <>
|
||||
|
|
@ -38,7 +38,7 @@ namespace juce
|
|||
};
|
||||
|
||||
#define JUCE_DECLARE_UUID_GETTER(name, uuid) \
|
||||
template<> struct UUIDGetter<name> { static CLSID get() { return uuidFromString (uuid); } };
|
||||
template <> struct UUIDGetter<name> { static CLSID get() { return uuidFromString (uuid); } };
|
||||
|
||||
#define JUCE_COMCLASS(name, guid) \
|
||||
struct name; \
|
||||
|
|
@ -138,7 +138,7 @@ public:
|
|||
return this->QueryInterface (__uuidof (OtherComClass), destObject);
|
||||
}
|
||||
|
||||
template<class OtherComClass>
|
||||
template <class OtherComClass>
|
||||
ComSmartPtr<OtherComClass> getInterface() const
|
||||
{
|
||||
ComSmartPtr<OtherComClass> destObject;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
#if (! JUCE_MSVC) && (! JUCE_CXX14_IS_AVAILABLE)
|
||||
namespace std
|
||||
{
|
||||
template<typename T, typename... Args>
|
||||
template <typename T, typename... Args>
|
||||
unique_ptr<T> make_unique (Args&&... args)
|
||||
{
|
||||
return unique_ptr<T> (new T (std::forward<Args> (args)...));
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace dsp
|
|||
|
||||
@tags{DSP}
|
||||
*/
|
||||
template<typename ElementType>
|
||||
template <typename ElementType>
|
||||
class Matrix
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ struct ProcessorDuplicator
|
|||
|
||||
void reset() noexcept { for (auto* p : processors) p->reset(); }
|
||||
|
||||
template<typename ProcessContext>
|
||||
template <typename ProcessContext>
|
||||
void process (const ProcessContext& context) noexcept
|
||||
{
|
||||
jassert ((int) context.getInputBlock().getNumChannels() <= processors.size());
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** Processes the input and output buffers supplied in the processing context. */
|
||||
template<typename ProcessContext>
|
||||
template <typename ProcessContext>
|
||||
void process (const ProcessContext& context) noexcept
|
||||
{
|
||||
auto&& inBlock = context.getInputBlock();
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ namespace juce
|
|||
namespace X11SymbolHelpers
|
||||
{
|
||||
|
||||
template<typename FuncPtr>
|
||||
template <typename FuncPtr>
|
||||
struct SymbolBinding
|
||||
{
|
||||
FuncPtr& func;
|
||||
const char* name;
|
||||
};
|
||||
|
||||
template<typename FuncPtr>
|
||||
template <typename FuncPtr>
|
||||
SymbolBinding<FuncPtr> makeSymbolBinding (FuncPtr& func, const char* name)
|
||||
{
|
||||
return { func, name };
|
||||
|
|
@ -54,19 +54,19 @@ bool loadSymbols (DynamicLibrary& lib, SymbolBinding<FuncPtr> binding)
|
|||
return false;
|
||||
}
|
||||
|
||||
template<typename FuncPtr, typename... Args>
|
||||
template <typename FuncPtr, typename... Args>
|
||||
bool loadSymbols (DynamicLibrary& lib1, DynamicLibrary& lib2, SymbolBinding<FuncPtr> binding)
|
||||
{
|
||||
return loadSymbols (lib1, binding) || loadSymbols (lib2, binding);
|
||||
}
|
||||
|
||||
template<typename FuncPtr, typename... Args>
|
||||
template <typename FuncPtr, typename... Args>
|
||||
bool loadSymbols (DynamicLibrary& lib, SymbolBinding<FuncPtr> binding, Args... args)
|
||||
{
|
||||
return loadSymbols (lib, binding) && loadSymbols (lib, args...);
|
||||
}
|
||||
|
||||
template<typename FuncPtr, typename... Args>
|
||||
template <typename FuncPtr, typename... Args>
|
||||
bool loadSymbols (DynamicLibrary& lib1, DynamicLibrary& lib2, SymbolBinding<FuncPtr> binding, Args... args)
|
||||
{
|
||||
return loadSymbols (lib1, lib2, binding) && loadSymbols (lib1, lib2, args...);
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ namespace juce
|
|||
//==============================================================================
|
||||
namespace ReturnHelpers
|
||||
{
|
||||
template<typename Type>
|
||||
template <typename Type>
|
||||
Type returnDefaultConstructedAnyType() { return {}; }
|
||||
|
||||
template<>
|
||||
template <>
|
||||
inline void returnDefaultConstructedAnyType<void>() {}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -137,18 +137,18 @@ namespace LiveConstantEditor
|
|||
Component* createBoolSlider (LivePropertyEditorBase&);
|
||||
|
||||
template <typename Type> struct CustomEditor { static Component* create (LivePropertyEditorBase&) { return nullptr; } };
|
||||
template<> struct CustomEditor<char> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template<> struct CustomEditor<unsigned char> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template<> struct CustomEditor<int> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template<> struct CustomEditor<unsigned int> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template<> struct CustomEditor<short> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template<> struct CustomEditor<unsigned short> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template<> struct CustomEditor<int64> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template<> struct CustomEditor<uint64> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template<> struct CustomEditor<float> { static Component* create (LivePropertyEditorBase& e) { return createFloatSlider (e); } };
|
||||
template<> struct CustomEditor<double> { static Component* create (LivePropertyEditorBase& e) { return createFloatSlider (e); } };
|
||||
template<> struct CustomEditor<Colour> { static Component* create (LivePropertyEditorBase& e) { return createColourEditor (e); } };
|
||||
template<> struct CustomEditor<bool> { static Component* create (LivePropertyEditorBase& e) { return createBoolSlider (e); } };
|
||||
template <> struct CustomEditor<char> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template <> struct CustomEditor<unsigned char> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template <> struct CustomEditor<int> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template <> struct CustomEditor<unsigned int> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template <> struct CustomEditor<short> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template <> struct CustomEditor<unsigned short> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template <> struct CustomEditor<int64> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template <> struct CustomEditor<uint64> { static Component* create (LivePropertyEditorBase& e) { return createIntegerSlider (e); } };
|
||||
template <> struct CustomEditor<float> { static Component* create (LivePropertyEditorBase& e) { return createFloatSlider (e); } };
|
||||
template <> struct CustomEditor<double> { static Component* create (LivePropertyEditorBase& e) { return createFloatSlider (e); } };
|
||||
template <> struct CustomEditor<Colour> { static Component* create (LivePropertyEditorBase& e) { return createColourEditor (e); } };
|
||||
template <> struct CustomEditor<bool> { static Component* create (LivePropertyEditorBase& e) { return createBoolSlider (e); } };
|
||||
|
||||
template <typename Type>
|
||||
struct LivePropertyEditor : public LivePropertyEditorBase
|
||||
|
|
|
|||
|
|
@ -127,14 +127,14 @@ private:
|
|||
clearSingletonInstance();
|
||||
}
|
||||
|
||||
template<typename FuncPtr>
|
||||
template <typename FuncPtr>
|
||||
struct SymbolBinding
|
||||
{
|
||||
FuncPtr& func;
|
||||
const char* name;
|
||||
};
|
||||
|
||||
template<typename FuncPtr>
|
||||
template <typename FuncPtr>
|
||||
SymbolBinding<FuncPtr> makeSymbolBinding (FuncPtr& func, const char* name)
|
||||
{
|
||||
return { func, name };
|
||||
|
|
@ -152,7 +152,7 @@ private:
|
|||
return false;
|
||||
}
|
||||
|
||||
template<typename FuncPtr, typename... Args>
|
||||
template <typename FuncPtr, typename... Args>
|
||||
bool loadSymbols (DynamicLibrary& lib, SymbolBinding<FuncPtr> binding, Args... args)
|
||||
{
|
||||
return loadSymbols (lib, binding) && loadSymbols (lib, args...);
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ public:
|
|||
|
||||
private:
|
||||
//==============================================================================
|
||||
template<class ArgType>
|
||||
template <class ArgType>
|
||||
static String getUriStringFromArgs (ArgType* args)
|
||||
{
|
||||
if (args != nullptr)
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ void VideoComponent::timerCallback()
|
|||
resized();
|
||||
}
|
||||
|
||||
template<class FileOrURL>
|
||||
template <class FileOrURL>
|
||||
Result VideoComponent::loadInternal (const FileOrURL& fileOrUrl, bool loadAsync)
|
||||
{
|
||||
#if JUCE_ANDROID || JUCE_IOS
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ private:
|
|||
void resized() override;
|
||||
void timerCallback() override;
|
||||
|
||||
template<class FileOrURL>
|
||||
template <class FileOrURL>
|
||||
Result loadInternal (const FileOrURL&, bool);
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VideoComponent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue