diff --git a/modules/juce_gui_basics/native/juce_FileChooser_ios.mm b/modules/juce_gui_basics/native/juce_FileChooser_ios.mm index b4d038e551..5fa0d1bd3b 100644 --- a/modules/juce_gui_basics/native/juce_FileChooser_ios.mm +++ b/modules/juce_gui_basics/native/juce_FileChooser_ios.mm @@ -192,18 +192,18 @@ private: if ((flags & FileBrowserComponent::canSelectDirectories) != 0) { - if (NSUniquePtr ptr {[UTType typeWithIdentifier: @"public.folder"]}) - [types.get() addObject: ptr.get()]; + if (auto* ptr = [UTType typeWithIdentifier: @"public.folder"]) + [types.get() addObject: ptr]; } else { if (validExtensions.isEmpty()) - if (NSUniquePtr ptr {[UTType typeWithIdentifier: @"public.data"]}) - [types.get() addObject: ptr.get()]; + if (auto* ptr = [UTType typeWithIdentifier: @"public.data"]) + [types.get() addObject: ptr]; for (const auto& extension : validExtensions) - if (NSUniquePtr ptr {[UTType typeWithFilenameExtension: juceStringToNS (extension)]}) - [types.get() addObject: ptr.get()]; + if (auto* ptr = [UTType typeWithFilenameExtension: juceStringToNS (extension)]) + [types.get() addObject: ptr]; } return [[FileChooserControllerClass alloc] initForOpeningContentTypes: types.get()];