diff --git a/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp index 6c9a2b8805..e8eeb3da9c 100644 --- a/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp @@ -173,7 +173,7 @@ Array LAMEEncoderAudioFormat::getPossibleSampleRates() Array LAMEEncoderAudioFormat::getPossibleBitDepths() { - return Array (16); + return { 16 }; } bool LAMEEncoderAudioFormat::canDoStereo() { return true; } diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index be0209a222..67b01abae9 100644 --- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -439,7 +439,7 @@ Array OggVorbisAudioFormat::getPossibleSampleRates() Array OggVorbisAudioFormat::getPossibleBitDepths() { - return Array (32); + return { 32 }; } bool OggVorbisAudioFormat::canDoStereo() { return true; } diff --git a/modules/juce_core/containers/juce_Array.h b/modules/juce_core/containers/juce_Array.h index fc30e0acb9..7692f739d6 100644 --- a/modules/juce_core/containers/juce_Array.h +++ b/modules/juce_core/containers/juce_Array.h @@ -106,13 +106,13 @@ public: } /** Initalises an Array of size 1 containing a single element. */ - explicit Array (const ElementType& singleElementToAdd) + Array (const ElementType& singleElementToAdd) { add (singleElementToAdd); } /** Initalises an Array of size 1 containing a single element. */ - explicit Array (ElementType&& singleElementToAdd) + Array (ElementType&& singleElementToAdd) { add (static_cast (singleElementToAdd)); } @@ -121,7 +121,7 @@ public: template Array (const ElementType& firstNewElement, OtherElements... otherElements) { - data.ensureAllocatedSize (1 + (int) sizeof... (otherElements)); + data.setAllocatedSize (1 + (int) sizeof... (otherElements)); addAssumingCapacityIsReady (firstNewElement, otherElements...); } @@ -129,7 +129,7 @@ public: template Array (ElementType&& firstNewElement, OtherElements... otherElements) { - data.ensureAllocatedSize (1 + (int) sizeof... (otherElements)); + data.setAllocatedSize (1 + (int) sizeof... (otherElements)); addAssumingCapacityIsReady (static_cast (firstNewElement), otherElements...); }