1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Removed the explicitness of the Array single-item constructors

This commit is contained in:
jules 2017-10-17 15:21:26 +01:00
parent 3544f30c90
commit acf28c6fa7
3 changed files with 6 additions and 6 deletions

View file

@ -173,7 +173,7 @@ Array<int> LAMEEncoderAudioFormat::getPossibleSampleRates()
Array<int> LAMEEncoderAudioFormat::getPossibleBitDepths()
{
return Array<int> (16);
return { 16 };
}
bool LAMEEncoderAudioFormat::canDoStereo() { return true; }

View file

@ -439,7 +439,7 @@ Array<int> OggVorbisAudioFormat::getPossibleSampleRates()
Array<int> OggVorbisAudioFormat::getPossibleBitDepths()
{
return Array<int> (32);
return { 32 };
}
bool OggVorbisAudioFormat::canDoStereo() { return true; }

View file

@ -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<ElementType&&> (singleElementToAdd));
}
@ -121,7 +121,7 @@ public:
template <typename... OtherElements>
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 <typename... OtherElements>
Array (ElementType&& firstNewElement, OtherElements... otherElements)
{
data.ensureAllocatedSize (1 + (int) sizeof... (otherElements));
data.setAllocatedSize (1 + (int) sizeof... (otherElements));
addAssumingCapacityIsReady (static_cast<ElementType&&> (firstNewElement), otherElements...);
}