Browse Source

Noticed that we still had some template whitespace workarounds for older compilers, so tidied them up

tags/2021-05-28
jules 8 years ago
parent
commit
dd4230586f
26 changed files with 69 additions and 67 deletions
  1. +1
    -1
      examples/Demo/Source/Demos/WindowsDemo.cpp
  2. +2
    -2
      modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp
  3. +2
    -2
      modules/juce_audio_devices/native/juce_android_OpenSL.cpp
  4. +2
    -2
      modules/juce_audio_devices/native/juce_linux_ALSA.cpp
  5. +1
    -1
      modules/juce_audio_devices/native/juce_win32_WASAPI.cpp
  6. +1
    -1
      modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUScopeElement.h
  7. +3
    -3
      modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm
  8. +7
    -7
      modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm
  9. +13
    -11
      modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm
  10. +2
    -2
      modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp
  11. +1
    -1
      modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp
  12. +1
    -1
      modules/juce_core/containers/juce_ListenerList.h
  13. +2
    -2
      modules/juce_core/native/juce_mac_Network.mm
  14. +1
    -1
      modules/juce_core/text/juce_String.cpp
  15. +1
    -1
      modules/juce_dsp/containers/juce_AudioBlock.h
  16. +2
    -2
      modules/juce_dsp/containers/juce_SIMDRegister.h
  17. +9
    -9
      modules/juce_dsp/containers/juce_SIMDRegister_test.cpp
  18. +2
    -2
      modules/juce_dsp/frequency/juce_FFT_test.cpp
  19. +3
    -3
      modules/juce_dsp/native/juce_fallback_SIMDNativeOps.h
  20. +1
    -1
      modules/juce_gui_basics/components/juce_Component.h
  21. +2
    -2
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp
  22. +1
    -1
      modules/juce_gui_basics/widgets/juce_TextEditor.cpp
  23. +1
    -1
      modules/juce_gui_basics/widgets/juce_TextEditor.h
  24. +1
    -1
      modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp
  25. +1
    -1
      modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.h
  26. +6
    -6
      modules/juce_osc/osc/juce_OSCReceiver.cpp

+ 1
- 1
examples/Demo/Source/Demos/WindowsDemo.cpp View File

@@ -249,7 +249,7 @@ private:
// Because in this demo the windows delete themselves, we'll use the // Because in this demo the windows delete themselves, we'll use the
// Component::SafePointer class to point to them, which automatically becomes // Component::SafePointer class to point to them, which automatically becomes
// null when the component that it points to is deleted. // null when the component that it points to is deleted.
Array< Component::SafePointer<Component> > windows;
Array<Component::SafePointer<Component>> windows;
TextButton showWindowsButton, closeWindowsButton; TextButton showWindowsButton, closeWindowsButton;
SafePointer<DialogWindow> dialogWindow; SafePointer<DialogWindow> dialogWindow;


+ 2
- 2
modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp View File

@@ -515,12 +515,12 @@ public:
// convert data from the source to dest format.. // convert data from the source to dest format..
ScopedPointer<AudioData::Converter> conv (new AudioData::ConverterInstance <AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::Const>, ScopedPointer<AudioData::Converter> conv (new AudioData::ConverterInstance <AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::Const>,
AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::NonConst> >());
AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::NonConst>>());
conv->convertSamples (inPlace ? reversed : converted, original, numSamples); conv->convertSamples (inPlace ? reversed : converted, original, numSamples);
// ..and back again.. // ..and back again..
conv = new AudioData::ConverterInstance <AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::Const>, conv = new AudioData::ConverterInstance <AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::Const>,
AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::NonConst> >();
AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::NonConst>>();
if (! inPlace) if (! inPlace)
zeromem (reversed, sizeof (reversed)); zeromem (reversed, sizeof (reversed));


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

@@ -755,8 +755,8 @@ public:
} }
//============================================================================== //==============================================================================
ScopedPointer<OpenSLQueueRunnerPlayer<T> > player;
ScopedPointer<OpenSLQueueRunnerRecorder<T> > recorder;
ScopedPointer<OpenSLQueueRunnerPlayer<T>> player;
ScopedPointer<OpenSLQueueRunnerRecorder<T>> recorder;
Atomic<int> guard; Atomic<int> guard;
jmethodID getUnderrunCount = 0; jmethodID getUnderrunCount = 0;
}; };


+ 2
- 2
modules/juce_audio_devices/native/juce_linux_ALSA.cpp View File

@@ -442,9 +442,9 @@ private:
typedef AudioData::Pointer <AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> SourceType; typedef AudioData::Pointer <AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> SourceType;
if (isLittleEndian) if (isLittleEndian)
return new AudioData::ConverterInstance <SourceType, AudioData::Pointer <SampleType, AudioData::LittleEndian, InterleavedType, AudioData::NonConst> > (1, numInterleavedChannels);
return new AudioData::ConverterInstance <SourceType, AudioData::Pointer <SampleType, AudioData::LittleEndian, InterleavedType, AudioData::NonConst>> (1, numInterleavedChannels);
return new AudioData::ConverterInstance <SourceType, AudioData::Pointer <SampleType, AudioData::BigEndian, InterleavedType, AudioData::NonConst> > (1, numInterleavedChannels);
return new AudioData::ConverterInstance <SourceType, AudioData::Pointer <SampleType, AudioData::BigEndian, InterleavedType, AudioData::NonConst>> (1, numInterleavedChannels);
} }
}; };


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

@@ -887,7 +887,7 @@ public:
void updateFormatWithType (DestType*) void updateFormatWithType (DestType*)
{ {
typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> NativeType; typedef AudioData::Pointer<AudioData::Float32, AudioData::NativeEndian, AudioData::NonInterleaved, AudioData::Const> NativeType;
converter = new AudioData::ConverterInstance<NativeType, AudioData::Pointer<DestType, AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst> > (1, actualNumChannels);
converter = new AudioData::ConverterInstance<NativeType, AudioData::Pointer<DestType, AudioData::LittleEndian, AudioData::Interleaved, AudioData::NonConst>> (1, actualNumChannels);
} }
void updateFormat (bool isFloat) override void updateFormat (bool isFloat) override


+ 1
- 1
modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUScopeElement.h View File

@@ -264,7 +264,7 @@ protected:
inline ParameterMapEvent& GetParamEvent(AudioUnitParameterID paramID); inline ParameterMapEvent& GetParamEvent(AudioUnitParameterID paramID);
private: private:
typedef std::map<AudioUnitParameterID, ParameterMapEvent, std::less<AudioUnitParameterID> > ParameterMap;
typedef std::map<AudioUnitParameterID, ParameterMapEvent, std::less<AudioUnitParameterID>> ParameterMap;
/*! @var mAudioUnit */ /*! @var mAudioUnit */
AUBase * mAudioUnit; AUBase * mAudioUnit;


+ 3
- 3
modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm View File

@@ -1635,7 +1635,7 @@ private:
//============================================================================== //==============================================================================
Array<AUChannelInfo> channelInfo; Array<AUChannelInfo> channelInfo;
Array<Array<AudioChannelLayoutTag> > supportedInputLayouts, supportedOutputLayouts;
Array<Array<AudioChannelLayoutTag>> supportedInputLayouts, supportedOutputLayouts;
Array<AudioChannelLayoutTag> currentInputLayout, currentOutputLayout; Array<AudioChannelLayoutTag> currentInputLayout, currentOutputLayout;
//============================================================================== //==============================================================================
@@ -2034,10 +2034,10 @@ private:
void addSupportedLayoutTagsForDirection (bool isInput) void addSupportedLayoutTagsForDirection (bool isInput)
{ {
Array<Array<AudioChannelLayoutTag> >& layouts = isInput ? supportedInputLayouts : supportedOutputLayouts;
auto& layouts = isInput ? supportedInputLayouts : supportedOutputLayouts;
layouts.clear(); layouts.clear();
auto numBuses = AudioUnitHelpers::getBusCount (juceFilter, isInput);
const int numBuses = AudioUnitHelpers::getBusCount (juceFilter, isInput);
for (int busNr = 0; busNr < numBuses; ++busNr) for (int busNr = 0; busNr < numBuses; ++busNr)
{ {
Array<AudioChannelLayoutTag> busLayouts; Array<AudioChannelLayoutTag> busLayouts;


+ 7
- 7
modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm View File

@@ -88,15 +88,15 @@ using namespace juce;
// TODO: use SFINAE to automatically generate this for all NSObjects // TODO: use SFINAE to automatically generate this for all NSObjects
template <> struct ContainerDeletePolicy<AUAudioUnitBusArray> { static void destroy (NSObject* o) { [o release]; } }; template <> struct ContainerDeletePolicy<AUAudioUnitBusArray> { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<AUParameterTree> { static void destroy (NSObject* o) { [o release]; } }; template <> struct ContainerDeletePolicy<AUParameterTree> { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<NSMutableArray<AUParameterNode *> > { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<NSMutableArray<AUParameterNode*>> { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<AUParameter> { static void destroy (NSObject* o) { [o release]; } }; template <> struct ContainerDeletePolicy<AUParameter> { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<NSMutableArray<AUAudioUnitBus*> > { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<NSMutableArray<AUAudioUnitBus*>> { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<AUAudioUnitBus> { static void destroy (NSObject* o) { [o release]; } }; template <> struct ContainerDeletePolicy<AUAudioUnitBus> { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<AVAudioFormat> { static void destroy (NSObject* o) { [o release]; } }; template <> struct ContainerDeletePolicy<AVAudioFormat> { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<AVAudioPCMBuffer> { static void destroy (NSObject* o) { [o release]; } }; template <> struct ContainerDeletePolicy<AVAudioPCMBuffer> { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<NSMutableArray<NSNumber*> > { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<NSMutableArray<NSNumber*>> { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<NSNumber> { static void destroy (NSObject* o) { [o release]; } }; template <> struct ContainerDeletePolicy<NSNumber> { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<NSMutableArray<AUAudioUnitPreset*> > { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<NSMutableArray<AUAudioUnitPreset*>> { static void destroy (NSObject* o) { [o release]; } };
template <> struct ContainerDeletePolicy<AUAudioUnitPreset> { static void destroy (NSObject* o) { [o release]; } }; template <> struct ContainerDeletePolicy<AUAudioUnitPreset> { static void destroy (NSObject* o) { [o release]; } };
//============================================================================== //==============================================================================
@@ -1050,7 +1050,7 @@ private:
//============================================================================== //==============================================================================
void addAudioUnitBusses (bool isInput) void addAudioUnitBusses (bool isInput)
{ {
ScopedPointer<NSMutableArray<AUAudioUnitBus*> > array = [[NSMutableArray<AUAudioUnitBus*> alloc] init];
ScopedPointer<NSMutableArray<AUAudioUnitBus*>> array = [[NSMutableArray<AUAudioUnitBus*> alloc] init];
AudioProcessor& processor = getAudioProcessor(); AudioProcessor& processor = getAudioProcessor();
const int n = AudioUnitHelpers::getBusCount (&processor, isInput); const int n = AudioUnitHelpers::getBusCount (&processor, isInput);
@@ -1076,7 +1076,7 @@ private:
void addParameters() void addParameters()
{ {
ScopedPointer<NSMutableArray<AUParameterNode*> > params = [[NSMutableArray<AUParameterNode*> alloc] init];
ScopedPointer<NSMutableArray<AUParameterNode*>> params = [[NSMutableArray<AUParameterNode*> alloc] init];
paramObserver = CreateObjCBlock (this, &JuceAudioUnitv3::valueChangedFromHost); paramObserver = CreateObjCBlock (this, &JuceAudioUnitv3::valueChangedFromHost);
paramProvider = CreateObjCBlock (this, &JuceAudioUnitv3::getValue); paramProvider = CreateObjCBlock (this, &JuceAudioUnitv3::getValue);
@@ -1451,7 +1451,7 @@ private:
ScopedPointer<NSMutableArray<NSNumber*>> overviewParams; ScopedPointer<NSMutableArray<NSNumber*>> overviewParams;
ScopedPointer<NSMutableArray<NSNumber*>> channelCapabilities; ScopedPointer<NSMutableArray<NSNumber*>> channelCapabilities;
ScopedPointer<NSMutableArray<AUAudioUnitPreset*> > factoryPresets;
ScopedPointer<NSMutableArray<AUAudioUnitPreset*>> factoryPresets;
ObjCBlock<AUInternalRenderBlock> internalRenderBlock; ObjCBlock<AUInternalRenderBlock> internalRenderBlock;


+ 13
- 11
modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm View File

@@ -430,18 +430,18 @@ public:
for (int dir = 0; dir < 2; ++dir) for (int dir = 0; dir < 2; ++dir)
{ {
const bool isInput = (dir == 0); const bool isInput = (dir == 0);
const Array<AudioChannelSet>& requestedLayouts = (isInput ? layouts.inputBuses : layouts.outputBuses);
const Array<AudioChannelSet>& oppositeRequestedLayouts = (isInput ? layouts.outputBuses : layouts.inputBuses);
const Array<Array<AudioChannelSet> >& supported = (isInput ? supportedInLayouts : supportedOutLayouts);
auto& requestedLayouts = (isInput ? layouts.inputBuses : layouts.outputBuses);
auto& oppositeRequestedLayouts = (isInput ? layouts.outputBuses : layouts.inputBuses);
auto& supported = (isInput ? supportedInLayouts : supportedOutLayouts);
const int n = getBusCount (isInput); const int n = getBusCount (isInput);
for (int busIdx = 0; busIdx < n; ++busIdx) for (int busIdx = 0; busIdx < n; ++busIdx)
{ {
const AudioChannelSet& requested = requestedLayouts.getReference (busIdx);
auto& requested = requestedLayouts.getReference (busIdx);
const int oppositeBusIdx = jmin (getBusCount (! isInput) - 1, busIdx); const int oppositeBusIdx = jmin (getBusCount (! isInput) - 1, busIdx);
const bool hasOppositeBus = (oppositeBusIdx >= 0); const bool hasOppositeBus = (oppositeBusIdx >= 0);
const AudioChannelSet oppositeRequested = (hasOppositeBus ? oppositeRequestedLayouts.getReference (oppositeBusIdx) : AudioChannelSet());
const Array<AudioChannelSet>& possible = supported.getReference (busIdx);
auto oppositeRequested = (hasOppositeBus ? oppositeRequestedLayouts.getReference (oppositeBusIdx) : AudioChannelSet());
auto& possible = supported.getReference (busIdx);
if (requested.isDisabled()) if (requested.isDisabled())
return false; return false;
@@ -452,9 +452,9 @@ public:
int i; int i;
for (i = 0; i < numChannelInfos; ++i) for (i = 0; i < numChannelInfos; ++i)
{ {
const AUChannelInfo& info = channelInfos[i];
const SInt16& thisChannels = (isInput ? info.inChannels : info.outChannels);
const SInt16& opChannels = (isInput ? info.outChannels : info.inChannels);
auto& info = channelInfos[i];
auto& thisChannels = (isInput ? info.inChannels : info.outChannels);
auto& opChannels = (isInput ? info.outChannels : info.inChannels);
// this bus // this bus
if (thisChannels == 0) continue; if (thisChannels == 0) continue;
@@ -472,11 +472,13 @@ public:
{ {
int numOppositeBuses = getBusCount (! isInput); int numOppositeBuses = getBusCount (! isInput);
int j; int j;
for (j = 0; j < numOppositeBuses; ++j) for (j = 0; j < numOppositeBuses; ++j)
if (requested.size() != oppositeRequestedLayouts.getReference (j).size()) if (requested.size() != oppositeRequestedLayouts.getReference (j).size())
break; break;
if (j < numOppositeBuses) continue;
if (j < numOppositeBuses)
continue;
} }
break; break;
@@ -1254,7 +1256,7 @@ private:
OwnedArray<AUBuffer> outputBufferList; OwnedArray<AUBuffer> outputBufferList;
AudioTimeStamp timeStamp; AudioTimeStamp timeStamp;
AudioSampleBuffer* currentBuffer; AudioSampleBuffer* currentBuffer;
Array<Array<AudioChannelSet> > supportedInLayouts, supportedOutLayouts;
Array<Array<AudioChannelSet>> supportedInLayouts, supportedOutLayouts;
int numChannelInfos; int numChannelInfos;
HeapBlock<AUChannelInfo> channelInfos; HeapBlock<AUChannelInfo> channelInfos;


+ 2
- 2
modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp View File

@@ -126,7 +126,7 @@ public:
} }
} }
void getLevels (int64 startSample, int numSamples, Array<Range<float> >& levels)
void getLevels (int64 startSample, int numSamples, Array<Range<float>>& levels)
{ {
const ScopedLock sl (readerLock); const ScopedLock sl (readerLock);
@@ -144,7 +144,7 @@ public:
if (reader != nullptr) if (reader != nullptr)
{ {
if (levels.size() < (int) reader->numChannels) if (levels.size() < (int) reader->numChannels)
levels.insertMultiple (0, Range<float>(), (int) reader->numChannels - levels.size());
levels.insertMultiple (0, {}, (int) reader->numChannels - levels.size());
reader->readMaxLevels (startSample, numSamples, levels.getRawDataPointer(), (int) reader->numChannels); reader->readMaxLevels (startSample, numSamples, levels.getRawDataPointer(), (int) reader->numChannels);


+ 1
- 1
modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp View File

@@ -76,7 +76,7 @@ struct AudioVisualiserComponent::ChannelInfo
} }
AudioVisualiserComponent& owner; AudioVisualiserComponent& owner;
Array<Range<float> > levels;
Array<Range<float>> levels;
Range<float> value; Range<float> value;
int nextSample, subSample; int nextSample, subSample;


+ 1
- 1
modules/juce_core/containers/juce_ListenerList.h View File

@@ -62,7 +62,7 @@ namespace juce
ListenerList::DummyBailOutChecker, which is a dummy checker that always returns false. ListenerList::DummyBailOutChecker, which is a dummy checker that always returns false.
*/ */
template <class ListenerClass, template <class ListenerClass,
class ArrayType = Array<ListenerClass*> >
class ArrayType = Array<ListenerClass*>>
class ListenerList class ListenerList
{ {
#ifndef DOXYGEN #ifndef DOXYGEN


+ 2
- 2
modules/juce_core/native/juce_mac_Network.mm View File

@@ -593,9 +593,9 @@ struct BackgroundDownloadTask : public URL::DownloadTask
} }
//============================================================================== //==============================================================================
struct DelegateClass : public ObjCClass<NSObject<NSURLSessionDelegate> >
struct DelegateClass : public ObjCClass<NSObject<NSURLSessionDelegate>>
{ {
DelegateClass() : ObjCClass<NSObject<NSURLSessionDelegate> > ("JUCE_URLDelegate_")
DelegateClass() : ObjCClass<NSObject<NSURLSessionDelegate>> ("JUCE_URLDelegate_")
{ {
addIvar<BackgroundDownloadTask*> ("state"); addIvar<BackgroundDownloadTask*> ("state");


+ 1
- 1
modules/juce_core/text/juce_String.cpp View File

@@ -448,7 +448,7 @@ namespace NumberToStringConverters
return printDigits (t, v); return printDigits (t, v);
} }
struct StackArrayStream : public std::basic_streambuf<char, std::char_traits<char> >
struct StackArrayStream : public std::basic_streambuf<char, std::char_traits<char>>
{ {
explicit StackArrayStream (char* d) explicit StackArrayStream (char* d)
{ {


+ 1
- 1
modules/juce_dsp/containers/juce_AudioBlock.h View File

@@ -504,7 +504,7 @@ public:
// This class can only be used with floating point types // This class can only be used with floating point types
static_assert (std::is_same<SampleType, float>::value || std::is_same<SampleType, double>::value static_assert (std::is_same<SampleType, float>::value || std::is_same<SampleType, double>::value
#if JUCE_USE_SIMD #if JUCE_USE_SIMD
|| std::is_same<SampleType, SIMDRegister<float> >::value || std::is_same<SampleType, SIMDRegister<double> >::value
|| std::is_same<SampleType, SIMDRegister<float>>::value || std::is_same<SampleType, SIMDRegister<double>>::value
#endif #endif
, "AudioBlock only supports single or double precision floating point types"); , "AudioBlock only supports single or double precision floating point types");


+ 2
- 2
modules/juce_dsp/containers/juce_SIMDRegister.h View File

@@ -356,7 +356,7 @@ struct CmplxSIMDOps
// The pure complex version // The pure complex version
template <typename Scalar> template <typename Scalar>
struct CmplxSIMDOps<std::complex<Scalar> >
struct CmplxSIMDOps<std::complex<Scalar>>
{ {
typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType; typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType;
@@ -379,7 +379,7 @@ struct CmplxSIMDOps<std::complex<Scalar> >
static inline std::complex<Scalar> JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept static inline std::complex<Scalar> JUCE_VECTOR_CALLTYPE sum (vSIMDType a) noexcept
{ {
vSIMDType result = SIMDNativeOps<Scalar>::oddevensum (a); vSIMDType result = SIMDNativeOps<Scalar>::oddevensum (a);
const Scalar* ptr = reinterpret_cast<const Scalar*> (&result);
auto* ptr = reinterpret_cast<const Scalar*> (&result);
return std::complex<Scalar> (ptr[0], ptr[1]); return std::complex<Scalar> (ptr[0], ptr[1]);
} }


+ 9
- 9
modules/juce_dsp/containers/juce_SIMDRegister_test.cpp View File

@@ -295,7 +295,7 @@ public:
for (size_t i = 0; i < SIMDRegister<type>::SIMDNumElements; ++i) for (size_t i = 0; i < SIMDRegister<type>::SIMDNumElements; ++i)
Operation::template inplace<type, type> (array_a[i], array_b[i]); Operation::template inplace<type, type> (array_a[i], array_b[i]);
Operation::template inplace<SIMDRegister<type>, SIMDRegister<type> > (a, b);
Operation::template inplace<SIMDRegister<type>, SIMDRegister<type>> (a, b);
u.expect (vecEqualToArray (a, array_a)); u.expect (vecEqualToArray (a, array_a));
u.expect (vecEqualToArray (b, array_b)); u.expect (vecEqualToArray (b, array_b));
@@ -325,7 +325,7 @@ public:
for (size_t i = 0; i < SIMDRegister<type>::SIMDNumElements; ++i) for (size_t i = 0; i < SIMDRegister<type>::SIMDNumElements; ++i)
array_c[i] = Operation::template outofplace<type, type> (array_a[i], array_b[i]); array_c[i] = Operation::template outofplace<type, type> (array_a[i], array_b[i]);
c = Operation::template outofplace<SIMDRegister<type>, SIMDRegister<type> > (a, b);
c = Operation::template outofplace<SIMDRegister<type>, SIMDRegister<type>> (a, b);
u.expect (vecEqualToArray (a, array_a)); u.expect (vecEqualToArray (a, array_a));
u.expect (vecEqualToArray (b, array_b)); u.expect (vecEqualToArray (b, array_b));
@@ -625,7 +625,7 @@ public:
TheTest::template run<uint32_t>(*this, random); TheTest::template run<uint32_t>(*this, random);
TheTest::template run<int64_t> (*this, random); TheTest::template run<int64_t> (*this, random);
TheTest::template run<uint64_t>(*this, random); TheTest::template run<uint64_t>(*this, random);
TheTest::template run<std::complex<float> > (*this, random);
TheTest::template run<std::complex<float>> (*this, random);
TheTest::template run<std::complex<double>> (*this, random); TheTest::template run<std::complex<double>> (*this, random);
} }
@@ -654,13 +654,13 @@ public:
runTestForAllTypes<AccessTest> ("AccessTest"); runTestForAllTypes<AccessTest> ("AccessTest");
runTestForAllTypes<OperatorTests<Addition> > ("AdditionOperators");
runTestForAllTypes<OperatorTests<Subtraction> > ("SubtractionOperators");
runTestForAllTypes<OperatorTests<Multiplication> > ("MultiplicationOperators");
runTestForAllTypes<OperatorTests<Addition>> ("AdditionOperators");
runTestForAllTypes<OperatorTests<Subtraction>> ("SubtractionOperators");
runTestForAllTypes<OperatorTests<Multiplication>> ("MultiplicationOperators");
runTestForAllTypes<BitOperatorTests<BitAND> > ("BitANDOperators");
runTestForAllTypes<BitOperatorTests<BitOR> > ("BitOROperators");
runTestForAllTypes<BitOperatorTests<BitXOR> > ("BitXOROperators");
runTestForAllTypes<BitOperatorTests<BitAND>> ("BitANDOperators");
runTestForAllTypes<BitOperatorTests<BitOR>> ("BitOROperators");
runTestForAllTypes<BitOperatorTests<BitXOR>> ("BitXOROperators");
runTestNonComplex<CheckComparisonOps> ("CheckComparisons"); runTestNonComplex<CheckComparisonOps> ("CheckComparisons");
runTestNonComplex<CheckMinMax> ("CheckMinMax"); runTestNonComplex<CheckMinMax> ("CheckMinMax");


+ 2
- 2
modules/juce_dsp/frequency/juce_FFT_test.cpp View File

@@ -144,7 +144,7 @@ struct FFTUnitTest : public UnitTest
FFT fft ((int) order); FFT fft ((int) order);
HeapBlock<float> inout (n << 1), reference (n << 1); HeapBlock<float> inout (n << 1), reference (n << 1);
HeapBlock<Complex<float> > frequency (n);
HeapBlock<Complex<float>> frequency (n);
fillRandom (random, inout.getData(), n); fillRandom (random, inout.getData(), n);
zeromem (reference.getData(), sizeof (float) * (n << 1)); zeromem (reference.getData(), sizeof (float) * (n << 1));
@@ -172,7 +172,7 @@ struct FFTUnitTest : public UnitTest
FFT fft ((int) order); FFT fft ((int) order);
HeapBlock<Complex<float> > input (n), buffer (n), output (n), reference (n);
HeapBlock<Complex<float>> input (n), buffer (n), output (n), reference (n);
fillRandom (random, input.getData(), n); fillRandom (random, input.getData(), n);
performReferenceFourier (input.getData(), reference.getData(), n, false); performReferenceFourier (input.getData(), reference.getData(), n, false);


+ 3
- 3
modules/juce_dsp/native/juce_fallback_SIMDNativeOps.h View File

@@ -40,11 +40,11 @@ namespace SIMDInternal
template <> struct MaskTypeFor <int16_t> { typedef uint16_t type; }; template <> struct MaskTypeFor <int16_t> { typedef uint16_t type; };
template <> struct MaskTypeFor <int32_t> { typedef uint32_t type; }; template <> struct MaskTypeFor <int32_t> { typedef uint32_t type; };
template <> struct MaskTypeFor <int64_t> { typedef uint64_t type; }; template <> struct MaskTypeFor <int64_t> { typedef uint64_t type; };
template <> struct MaskTypeFor <std::complex<float> > { typedef uint32_t type; };
template <> struct MaskTypeFor <std::complex<double> > { typedef uint64_t type; };
template <> struct MaskTypeFor <std::complex<float>> { typedef uint32_t type; };
template <> struct MaskTypeFor <std::complex<double>> { typedef uint64_t type; };
template <typename Primitive> struct PrimitiveType { typedef Primitive type; }; template <typename Primitive> struct PrimitiveType { typedef Primitive type; };
template <typename Primitive> struct PrimitiveType<std::complex<Primitive> > { typedef Primitive type; };
template <typename Primitive> struct PrimitiveType<std::complex<Primitive>> { typedef Primitive type; };
template <int n> struct Log2Helper { enum { value = Log2Helper<n/2>::value + 1 }; }; template <int n> struct Log2Helper { enum { value = Log2Helper<n/2>::value + 1 }; };
template <> struct Log2Helper<1> { enum { value = 0 }; }; template <> struct Log2Helper<1> { enum { value = 0 }; };


+ 1
- 1
modules/juce_gui_basics/components/juce_Component.h View File

@@ -2270,7 +2270,7 @@ private:
friend class MouseListenerList; friend class MouseListenerList;
friend struct ContainerDeletePolicy<MouseListenerList>; friend struct ContainerDeletePolicy<MouseListenerList>;
ScopedPointer<MouseListenerList> mouseListeners; ScopedPointer<MouseListenerList> mouseListeners;
ScopedPointer<Array<KeyListener*> > keyListeners;
ScopedPointer<Array<KeyListener*>> keyListeners;
ListenerList<ComponentListener> componentListeners; ListenerList<ComponentListener> componentListeners;
NamedValueSet properties; NamedValueSet properties;


+ 2
- 2
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -3386,7 +3386,7 @@ private:
compositionRange.setLength (0); compositionRange.setLength (0);
target->setHighlightedRegion (Range<int>::emptyRange (compositionRange.getEnd())); target->setHighlightedRegion (Range<int>::emptyRange (compositionRange.getEnd()));
target->setTemporaryUnderlining (Array<Range<int> >());
target->setTemporaryUnderlining ({});
} }
if (auto hImc = ImmGetContext (hWnd)) if (auto hImc = ImmGetContext (hWnd))
@@ -3414,7 +3414,7 @@ private:
Range<int>::emptyRange (-1)); Range<int>::emptyRange (-1));
reset(); reset();
target->setTemporaryUnderlining (Array<Range<int> >());
target->setTemporaryUnderlining ({});
} }
else if ((lParam & GCS_COMPSTR) != 0) // (composition is still in-progress) else if ((lParam & GCS_COMPSTR) != 0) // (composition is still in-progress)
{ {


+ 1
- 1
modules/juce_gui_basics/widgets/juce_TextEditor.cpp View File

@@ -2106,7 +2106,7 @@ void TextEditor::handleCommandMessage (const int commandId)
} }
} }
void TextEditor::setTemporaryUnderlining (const Array<Range<int> >& newUnderlinedSections)
void TextEditor::setTemporaryUnderlining (const Array<Range<int>>& newUnderlinedSections)
{ {
underlinedSections = newUnderlinedSections; underlinedSections = newUnderlinedSections;
repaint(); repaint();


+ 1
- 1
modules/juce_gui_basics/widgets/juce_TextEditor.h View File

@@ -659,7 +659,7 @@ public:
/** @internal */ /** @internal */
bool isTextInputActive() const override; bool isTextInputActive() const override;
/** @internal */ /** @internal */
void setTemporaryUnderlining (const Array<Range<int> >&) override;
void setTemporaryUnderlining (const Array<Range<int>>&) override;
/** @internal */ /** @internal */
VirtualKeyboardType getKeyboardType() override { return keyboardType; } VirtualKeyboardType getKeyboardType() override { return keyboardType; }


+ 1
- 1
modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp View File

@@ -398,7 +398,7 @@ bool CodeEditorComponent::isTextInputActive() const
return true; return true;
} }
void CodeEditorComponent::setTemporaryUnderlining (const Array<Range<int> >&)
void CodeEditorComponent::setTemporaryUnderlining (const Array<Range<int>>&)
{ {
jassertfalse; // TODO Windows IME not yet supported for this comp.. jassertfalse; // TODO Windows IME not yet supported for this comp..
} }


+ 1
- 1
modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.h View File

@@ -350,7 +350,7 @@ public:
/** @internal */ /** @internal */
bool isTextInputActive() const override; bool isTextInputActive() const override;
/** @internal */ /** @internal */
void setTemporaryUnderlining (const Array<Range<int> >&) override;
void setTemporaryUnderlining (const Array<Range<int>>&) override;
/** @internal */ /** @internal */
ApplicationCommandTarget* getNextCommandTarget() override; ApplicationCommandTarget* getNextCommandTarget() override;
/** @internal */ /** @internal */


+ 6
- 6
modules/juce_osc/osc/juce_OSCReceiver.cpp View File

@@ -470,7 +470,7 @@ private:
template <typename ListenerType> template <typename ListenerType>
void addListenerWithAddress (ListenerType* listenerToAdd, void addListenerWithAddress (ListenerType* listenerToAdd,
OSCAddress address, OSCAddress address,
Array<std::pair<OSCAddress, ListenerType*> >& array)
Array<std::pair<OSCAddress, ListenerType*>>& array)
{ {
for (auto& i : array) for (auto& i : array)
if (address == i.first && listenerToAdd == i.second) if (address == i.first && listenerToAdd == i.second)
@@ -482,7 +482,7 @@ private:
//============================================================================== //==============================================================================
template <typename ListenerType> template <typename ListenerType>
void removeListenerWithAddress (ListenerType* listenerToRemove, void removeListenerWithAddress (ListenerType* listenerToRemove,
Array<std::pair<OSCAddress, ListenerType*> >& array)
Array<std::pair<OSCAddress, ListenerType*>>& array)
{ {
for (int i = 0; i < array.size(); ++i) for (int i = 0; i < array.size(); ++i)
{ {
@@ -551,11 +551,11 @@ private:
} }
//============================================================================== //==============================================================================
ListenerList<OSCReceiver::Listener<OSCReceiver::MessageLoopCallback> > listeners;
ListenerList<OSCReceiver::Listener<OSCReceiver::RealtimeCallback> > realtimeListeners;
ListenerList<OSCReceiver::Listener<OSCReceiver::MessageLoopCallback>> listeners;
ListenerList<OSCReceiver::Listener<OSCReceiver::RealtimeCallback>> realtimeListeners;
Array<std::pair<OSCAddress, OSCReceiver::ListenerWithOSCAddress<OSCReceiver::MessageLoopCallback>* > > listenersWithAddress;
Array<std::pair<OSCAddress, OSCReceiver::ListenerWithOSCAddress<OSCReceiver::RealtimeCallback>* > > realtimeListenersWithAddress;
Array<std::pair<OSCAddress, OSCReceiver::ListenerWithOSCAddress<OSCReceiver::MessageLoopCallback>*>> listenersWithAddress;
Array<std::pair<OSCAddress, OSCReceiver::ListenerWithOSCAddress<OSCReceiver::RealtimeCallback>*>> realtimeListenersWithAddress;
ScopedPointer<DatagramSocket> socket; ScopedPointer<DatagramSocket> socket;
int portNumber = 0; int portNumber = 0;


Loading…
Cancel
Save