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

Added some overloads to OwnedArray to let items be added from std::unique_ptrs. Also removed OwnedArray::addIfNotAlreadyThere because it's ambiguous about whether the object should be deleted if it fails to be added!

This commit is contained in:
jules 2019-05-14 15:16:15 +01:00
parent 332a9edb57
commit 62ead7dc7d
12 changed files with 94 additions and 56 deletions

View file

@ -2385,15 +2385,11 @@ private:
void getIconImages (OwnedArray<Drawable>& images) const
{
std::unique_ptr<Drawable> bigIcon (getBigIcon());
if (auto icon = getBigIcon())
images.add (std::move (icon));
if (bigIcon != nullptr)
images.add (bigIcon.release());
std::unique_ptr<Drawable> smallIcon (getSmallIcon());
if (smallIcon != nullptr)
images.add (smallIcon.release());
if (auto icon = getSmallIcon())
images.add (std::move (icon));
}
void createiOSIconFiles (File appIconSet) const