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:
parent
3544f30c90
commit
acf28c6fa7
3 changed files with 6 additions and 6 deletions
|
|
@ -173,7 +173,7 @@ Array<int> LAMEEncoderAudioFormat::getPossibleSampleRates()
|
|||
|
||||
Array<int> LAMEEncoderAudioFormat::getPossibleBitDepths()
|
||||
{
|
||||
return Array<int> (16);
|
||||
return { 16 };
|
||||
}
|
||||
|
||||
bool LAMEEncoderAudioFormat::canDoStereo() { return true; }
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ Array<int> OggVorbisAudioFormat::getPossibleSampleRates()
|
|||
|
||||
Array<int> OggVorbisAudioFormat::getPossibleBitDepths()
|
||||
{
|
||||
return Array<int> (32);
|
||||
return { 32 };
|
||||
}
|
||||
|
||||
bool OggVorbisAudioFormat::canDoStereo() { return true; }
|
||||
|
|
|
|||
|
|
@ -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...);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue