File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
modules/juce_gui_basics/native Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -214,13 +214,13 @@ void pickerWasCancelled()
214214
215215 static FileChooserControllerClass* oldFn (int flags, const StringArray& validExtensions)
216216 {
217- const NSUniquePtr< NSArray > utTypeArray { std::invoke ([&]
217+ const auto utTypes { std::invoke ([&]() -> StringArray
218218 {
219219 if ((flags & FileBrowserComponent::canSelectDirectories) != 0 )
220- return @[ @ " public.folder" ] ;
220+ return { " public.folder" } ;
221221
222222 if (validExtensions.isEmpty ())
223- return @[ @ " public.data" ] ;
223+ return { " public.data" } ;
224224
225225 StringArray result;
226226
@@ -237,11 +237,11 @@ void pickerWasCancelled()
237237 JUCE_END_IGNORE_WARNINGS_GCC_LIKE
238238 }
239239
240- return createNSArrayFromStringArray ( result) ;
240+ return result;
241241 }) };
242242
243243 JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE (" -Wdeprecated-declarations" )
244- return [[FileChooserControllerClass alloc ] initWithDocumentTypes: utTypeArray. get ( ) inMode: UIDocumentPickerModeOpen];
244+ return [[FileChooserControllerClass alloc ] initWithDocumentTypes: createNSArrayFromStringArray (utTypes ) inMode: UIDocumentPickerModeOpen];
245245 JUCE_END_IGNORE_WARNINGS_GCC_LIKE
246246 }
247247 };
You can’t perform that action at this time.
0 commit comments