diff --git a/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm index 54b04ffd15..336e8e8f43 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm @@ -890,7 +890,7 @@ public: for (auto i = 0u; i < n; ++i) { - if (auto* viewConfiguration = [configs objectAtIndex:i]) + if (auto viewConfiguration = [configs objectAtIndex: i]) { if (editor->supportsHostMIDIControllerPresence ([viewConfiguration hostHasController] == YES)) { diff --git a/modules/juce_core/native/juce_osx_ObjCHelpers.h b/modules/juce_core/native/juce_osx_ObjCHelpers.h index f461bc3863..d98af4f803 100644 --- a/modules/juce_core/native/juce_osx_ObjCHelpers.h +++ b/modules/juce_core/native/juce_osx_ObjCHelpers.h @@ -59,7 +59,7 @@ static inline NSURL* createNSURLFromFile (const File& f) static inline NSArray* createNSArrayFromStringArray (const StringArray& strings) { - auto* array = [[NSMutableArray alloc] init]; + auto array = [[NSMutableArray alloc] init]; for (auto string: strings) [array addObject:juceStringToNS (string)]; @@ -71,7 +71,7 @@ static NSArray* varArrayToNSArray (const var& varToParse); static NSDictionary* varObjectToNSDictionary (const var& varToParse) { - auto* dictionary = [NSMutableDictionary dictionary]; + auto dictionary = [NSMutableDictionary dictionary]; if (varToParse.isObject()) { @@ -118,7 +118,7 @@ static NSArray* varArrayToNSArray (const var& varToParse) const auto* varArray = varToParse.getArray(); - auto* array = [NSMutableArray arrayWithCapacity: (NSUInteger) varArray->size()]; + auto array = [NSMutableArray arrayWithCapacity: (NSUInteger) varArray->size()]; for (const auto& aVar : *varArray) { diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index 6611031738..dcb232a301 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -574,11 +574,11 @@ public: BOOL isBookmarkStale = false; NSError* error = nil; - auto* nsURL = [NSURL URLByResolvingBookmarkData: bookmark - options: 0 - relativeToURL: nil - bookmarkDataIsStale: &isBookmarkStale - error: &error]; + auto nsURL = [NSURL URLByResolvingBookmarkData: bookmark + options: 0 + relativeToURL: nil + bookmarkDataIsStale: &isBookmarkStale + error: &error]; if (error == nil) { @@ -589,7 +589,7 @@ public: } else { - auto* desc = [error localizedDescription]; + auto desc = [error localizedDescription]; ignoreUnused (desc); jassertfalse; } @@ -607,10 +607,10 @@ private: BOOL isBookmarkStale = false; NSError* error = nil; - auto* nsURL = [NSURL URLByResolvingBookmarkData: bookmark - options: 0 - relativeToURL: nil - bookmarkDataIsStale: &isBookmarkStale + auto nsURL = [NSURL URLByResolvingBookmarkData: bookmark + options: 0 + relativeToURL: nil + bookmarkDataIsStale: &isBookmarkStale error: &error]; if (error == nil) @@ -624,7 +624,7 @@ private: } else { - auto* desc = [error localizedDescription]; + auto desc = [error localizedDescription]; ignoreUnused (desc); jassertfalse; } diff --git a/modules/juce_gui_basics/native/juce_ios_ContentSharer.cpp b/modules/juce_gui_basics/native/juce_ios_ContentSharer.cpp index 13ac6d5578..1111288356 100644 --- a/modules/juce_gui_basics/native/juce_ios_ContentSharer.cpp +++ b/modules/juce_gui_basics/native/juce_ios_ContentSharer.cpp @@ -45,7 +45,7 @@ public: void shareFiles (const Array& files) override { - auto* urls = [NSMutableArray arrayWithCapacity: (NSUInteger) files.size()]; + auto urls = [NSMutableArray arrayWithCapacity: (NSUInteger) files.size()]; for (const auto& f : files) { @@ -86,7 +86,7 @@ public: void shareText (const String& text) override { - auto* array = [NSArray arrayWithObject: juceStringToNS (text)]; + auto array = [NSArray arrayWithObject: juceStringToNS (text)]; share (array); } diff --git a/modules/juce_gui_basics/native/juce_ios_FileChooser.mm b/modules/juce_gui_basics/native/juce_ios_FileChooser.mm index 438d16a8e7..cf5f613e0c 100644 --- a/modules/juce_gui_basics/native/juce_ios_FileChooser.mm +++ b/modules/juce_gui_basics/native/juce_ios_FileChooser.mm @@ -222,7 +222,7 @@ private: NSArray* intents = @[fileAccessIntent]; - auto* fileCoordinator = [[NSFileCoordinator alloc] initWithFilePresenter: nil]; + auto fileCoordinator = [[NSFileCoordinator alloc] initWithFilePresenter: nil]; [fileCoordinator coordinateAccessWithIntents: intents queue: [NSOperationQueue mainQueue] byAccessor: ^(NSError* err) { @@ -251,7 +251,7 @@ private: } else { - auto* desc = [error localizedDescription]; + auto desc = [error localizedDescription]; ignoreUnused (desc); jassertfalse; } @@ -260,7 +260,7 @@ private: } else { - auto* desc = [err localizedDescription]; + auto desc = [err localizedDescription]; ignoreUnused (desc); jassertfalse; } diff --git a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm index 39daf31b70..69c838cea5 100644 --- a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm +++ b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm @@ -227,7 +227,7 @@ private: else { auto* openPanel = (NSOpenPanel*) panel; - auto* urls = [openPanel URLs]; + auto urls = [openPanel URLs]; for (unsigned int i = 0; i < [urls count]; ++i) addURLResult ([urls objectAtIndex: i]); diff --git a/modules/juce_gui_basics/native/juce_mac_MainMenu.mm b/modules/juce_gui_basics/native/juce_mac_MainMenu.mm index ec70020df8..50798a6786 100644 --- a/modules/juce_gui_basics/native/juce_mac_MainMenu.mm +++ b/modules/juce_gui_basics/native/juce_mac_MainMenu.mm @@ -33,11 +33,11 @@ struct JuceMainMenuBarHolder : private DeletedAtShutdown JuceMainMenuBarHolder() : mainMenuBar ([[NSMenu alloc] initWithTitle: nsStringLiteral ("MainMenu")]) { - auto* item = [mainMenuBar addItemWithTitle: nsStringLiteral ("Apple") - action: nil + auto item = [mainMenuBar addItemWithTitle: nsStringLiteral ("Apple") + action: nil keyEquivalent: nsEmptyString()]; - auto* appMenu = [[NSMenu alloc] initWithTitle: nsStringLiteral ("Apple")]; + auto appMenu = [[NSMenu alloc] initWithTitle: nsStringLiteral ("Apple")]; [NSApp performSelector: @selector (setAppleMenu:) withObject: appMenu]; [mainMenuBar setSubmenu: appMenu forItem: item]; @@ -277,9 +277,9 @@ public: } else { - auto* item = [[NSMenuItem alloc] initWithTitle: text - action: @selector (menuItemInvoked:) - keyEquivalent: nsEmptyString()]; + auto item = [[NSMenuItem alloc] initWithTitle: text + action: @selector (menuItemInvoked:) + keyEquivalent: nsEmptyString()]; [item setTag: topLevelIndex]; [item setEnabled: i.isEnabled]; @@ -478,9 +478,9 @@ private: { if (isPositiveAndBelow (menuItemIndex, (int) [parentMenu numberOfItems])) { - auto* menuItem = [parentMenu itemAtIndex:menuItemIndex]; + auto menuItem = [parentMenu itemAtIndex:menuItemIndex]; - if (auto* submenu = [menuItem submenu]) + if (auto submenu = [menuItem submenu]) removeItemRecursive (submenu); [parentMenu removeItem:menuItem]; @@ -706,7 +706,7 @@ namespace MainMenuHelpers { if ([mainMenu numberOfItems] > 0) { - if (auto* appMenu = [[mainMenu itemAtIndex:0] submenu]) + if (auto appMenu = [[mainMenu itemAtIndex: 0] submenu]) { [appMenu removeAllItems]; MainMenuHelpers::createStandardAppMenu (appMenu, app->getApplicationName(), extraItems); diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index 63da09ce9c..b783efbd47 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -1056,7 +1056,7 @@ public: { if (isSharedWindow) { - auto* newWindow = [view window]; + auto newWindow = [view window]; bool shouldSetVisible = (window == nullptr && newWindow != nullptr); window = newWindow; diff --git a/modules/juce_gui_basics/native/juce_mac_Windowing.mm b/modules/juce_gui_basics/native/juce_mac_Windowing.mm index 0f9f7fb47a..a3e348b62c 100644 --- a/modules/juce_gui_basics/native/juce_mac_Windowing.mm +++ b/modules/juce_gui_basics/native/juce_mac_Windowing.mm @@ -260,7 +260,7 @@ bool DragAndDropContainer::performExternalDragDropOfText (const String& text, Co { JUCE_AUTORELEASEPOOL { - if (auto* event = [[view window] currentEvent]) + if (auto event = [[view window] currentEvent]) { id helper = [draggingSourceHelper.createInstance() init]; NSDraggingSourceHelper::setText (helper, text); @@ -269,18 +269,18 @@ bool DragAndDropContainer::performExternalDragDropOfText (const String& text, Co if (callback != nullptr) NSDraggingSourceHelper::setCompletionCallback (helper, callback); - auto* pasteboardItem = [[NSPasteboardItem new] autorelease]; + auto pasteboardItem = [[NSPasteboardItem new] autorelease]; [pasteboardItem setDataProvider: helper forTypes: [NSArray arrayWithObjects: NSPasteboardTypeString, nil]]; - auto* dragItem = [[[NSDraggingItem alloc] initWithPasteboardWriter: pasteboardItem] autorelease]; + auto dragItem = [[[NSDraggingItem alloc] initWithPasteboardWriter: pasteboardItem] autorelease]; NSImage* image = [[NSWorkspace sharedWorkspace] iconForFile: nsEmptyString()]; [dragItem setDraggingFrame: getDragRect (view, event) contents: image]; - if (auto* session = [view beginDraggingSessionWithItems: [NSArray arrayWithObject: dragItem] - event: event - source: helper]) + if (auto session = [view beginDraggingSessionWithItems: [NSArray arrayWithObject: dragItem] + event: event + source: helper]) { session.animatesToStartingPositionsOnCancelOrFail = YES; session.draggingFormation = NSDraggingFormationNone; @@ -304,20 +304,20 @@ bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& fi { JUCE_AUTORELEASEPOOL { - if (auto* event = [[view window] currentEvent]) + if (auto event = [[view window] currentEvent]) { - auto* dragItems = [[[NSMutableArray alloc] init] autorelease]; + auto dragItems = [[[NSMutableArray alloc] init] autorelease]; for (auto& filename : files) { auto* nsFilename = juceStringToNS (filename); - auto* fileURL = [NSURL fileURLWithPath: nsFilename]; - auto* dragItem = [[NSDraggingItem alloc] initWithPasteboardWriter: fileURL]; + auto fileURL = [NSURL fileURLWithPath: nsFilename]; + auto dragItem = [[NSDraggingItem alloc] initWithPasteboardWriter: fileURL]; auto eventPos = [event locationInWindow]; auto dragRect = [view convertRect: NSMakeRect (eventPos.x - 16.0f, eventPos.y - 16.0f, 32.0f, 32.0f) fromView: nil]; - auto* dragImage = [[NSWorkspace sharedWorkspace] iconForFile: nsFilename]; + auto dragImage = [[NSWorkspace sharedWorkspace] iconForFile: nsFilename]; [dragItem setDraggingFrame: dragRect contents: dragImage]; @@ -325,7 +325,7 @@ bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& fi [dragItem release]; } - auto* helper = [draggingSourceHelper.createInstance() autorelease]; + auto helper = [draggingSourceHelper.createInstance() autorelease]; if (callback != nullptr) NSDraggingSourceHelper::setCompletionCallback (helper, callback); diff --git a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp index 54a748e253..9fd53d9c72 100644 --- a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp +++ b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp @@ -158,14 +158,14 @@ void RecentlyOpenedFilesList::forgetRecentFileNatively (const File& file) // from the recent list, so we clear them all and add them back excluding // the specified file - auto* sharedDocController = [NSDocumentController sharedDocumentController]; - auto* recentDocumentURLs = [sharedDocController recentDocumentURLs]; + auto sharedDocController = [NSDocumentController sharedDocumentController]; + auto recentDocumentURLs = [sharedDocController recentDocumentURLs]; [sharedDocController clearRecentDocuments: nil]; auto* nsFile = createNSURLFromFile (file); - auto* reverseEnumerator = [recentDocumentURLs reverseObjectEnumerator]; + auto reverseEnumerator = [recentDocumentURLs reverseObjectEnumerator]; for (NSURL* url : reverseEnumerator) if (! [url isEqual:nsFile]) diff --git a/modules/juce_gui_extra/native/juce_ios_PushNotifications.cpp b/modules/juce_gui_extra/native/juce_ios_PushNotifications.cpp index f140f23512..0aa43b6cb8 100644 --- a/modules/juce_gui_extra/native/juce_ios_PushNotifications.cpp +++ b/modules/juce_gui_extra/native/juce_ios_PushNotifications.cpp @@ -37,7 +37,7 @@ namespace PushNotificationsDelegateDetails { if (iOSEarlierThan10) { - auto* action = [[UIMutableUserNotificationAction alloc] init]; + auto action = [[UIMutableUserNotificationAction alloc] init]; action.identifier = juceStringToNS (a.identifier); action.title = juceStringToNS (a.title); @@ -77,10 +77,10 @@ namespace PushNotificationsDelegateDetails { if (iOSEarlierThan10) { - auto* category = [[UIMutableUserNotificationCategory alloc] init]; + auto category = [[UIMutableUserNotificationCategory alloc] init]; category.identifier = juceStringToNS (c.identifier); - auto* actions = [NSMutableArray arrayWithCapacity: (NSUInteger) c.actions.size()]; + auto actions = [NSMutableArray arrayWithCapacity: (NSUInteger) c.actions.size()]; for (const auto& a : c.actions) { @@ -98,7 +98,7 @@ namespace PushNotificationsDelegateDetails else { #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 - auto* actions = [NSMutableArray arrayWithCapacity: (NSUInteger) c.actions.size()]; + auto actions = [NSMutableArray arrayWithCapacity: (NSUInteger) c.actions.size()]; for (const auto& a : c.actions) { @@ -119,7 +119,7 @@ namespace PushNotificationsDelegateDetails //============================================================================== UILocalNotification* juceNotificationToUILocalNotification (const PushNotifications::Notification& n) { - auto* notification = [[UILocalNotification alloc] init]; + auto notification = [[UILocalNotification alloc] init]; notification.alertTitle = juceStringToNS (n.title); notification.alertBody = juceStringToNS (n.body); @@ -144,7 +144,7 @@ namespace PushNotificationsDelegateDetails UNNotificationRequest* juceNotificationToUNNotificationRequest (const PushNotifications::Notification& n) { // content - auto* content = [[UNMutableNotificationContent alloc] init]; + auto content = [[UNMutableNotificationContent alloc] init]; content.title = juceStringToNS (n.title); content.subtitle = juceStringToNS (n.subtitle); @@ -585,7 +585,7 @@ struct PushNotifications::Pimpl : private PushNotificationsDelegate { settings = settingsToUse; - auto* categories = [NSMutableSet setWithCapacity: (NSUInteger) settings.categories.size()]; + auto categories = [NSMutableSet setWithCapacity: (NSUInteger) settings.categories.size()]; if (iOSEarlierThan10) { diff --git a/modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp b/modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp index 90943fe346..c23d8e257d 100644 --- a/modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp +++ b/modules/juce_gui_extra/native/juce_mac_PushNotifications.cpp @@ -36,7 +36,7 @@ namespace PushNotificationsDelegateDetailsOsx bool isEarlierThanMavericks, bool isEarlierThanYosemite) { - auto* notification = [[NSUserNotification alloc] init]; + auto notification = [[NSUserNotification alloc] init]; notification.title = juceStringToNS (n.title); notification.subtitle = juceStringToNS (n.subtitle); @@ -48,7 +48,7 @@ namespace PushNotificationsDelegateDetailsOsx if (n.repeat && n.triggerIntervalSec >= 60) { - auto* dateComponents = [[NSDateComponents alloc] init]; + auto dateComponents = [[NSDateComponents alloc] init]; auto intervalSec = NSInteger (n.triggerIntervalSec); dateComponents.second = intervalSec; dateComponents.nanosecond = NSInteger ((n.triggerIntervalSec - intervalSec) * 1000000000); @@ -115,7 +115,7 @@ namespace PushNotificationsDelegateDetailsOsx { if (n.actions.size() > 1) { - auto* additionalActions = [NSMutableArray arrayWithCapacity: (NSUInteger) n.actions.size() - 1]; + auto additionalActions = [NSMutableArray arrayWithCapacity: (NSUInteger) n.actions.size() - 1]; for (int a = 1; a < n.actions.size(); ++a) [additionalActions addObject: [NSUserNotificationAction actionWithIdentifier: juceStringToNS (n.actions[a].identifier) @@ -469,10 +469,10 @@ struct PushNotifications::Pimpl : private PushNotificationsDelegate //PushNotificationsDelegate void registeredForRemoteNotifications (NSData* deviceTokenToUse) override { - auto* deviceTokenString = [[[[deviceTokenToUse description] - stringByReplacingOccurrencesOfString: nsStringLiteral ("<") withString: nsStringLiteral ("")] - stringByReplacingOccurrencesOfString: nsStringLiteral (">") withString: nsStringLiteral ("")] - stringByReplacingOccurrencesOfString: nsStringLiteral (" ") withString: nsStringLiteral ("")]; + auto deviceTokenString = [[[[deviceTokenToUse description] + stringByReplacingOccurrencesOfString: nsStringLiteral ("<") withString: nsStringLiteral ("")] + stringByReplacingOccurrencesOfString: nsStringLiteral (">") withString: nsStringLiteral ("")] + stringByReplacingOccurrencesOfString: nsStringLiteral (" ") withString: nsStringLiteral ("")]; deviceToken = nsStringToJuce (deviceTokenString); diff --git a/modules/juce_opengl/juce_opengl.cpp b/modules/juce_opengl/juce_opengl.cpp index 60021bfbbd..e3e96e8cda 100644 --- a/modules/juce_opengl/juce_opengl.cpp +++ b/modules/juce_opengl/juce_opengl.cpp @@ -177,7 +177,7 @@ static bool checkPeerIsValid (OpenGLContext* context) #if JUCE_MAC || JUCE_IOS if (auto* nsView = (JUCE_IOS_MAC_VIEW*) peer->getNativeHandle()) { - if (auto* nsWindow = [nsView window]) + if (auto nsWindow = [nsView window]) { #if JUCE_MAC return ([nsWindow isVisible] diff --git a/modules/juce_product_unlocking/native/juce_ios_InAppPurchases.cpp b/modules/juce_product_unlocking/native/juce_ios_InAppPurchases.cpp index c619832a94..734de7a8c1 100644 --- a/modules/juce_product_unlocking/native/juce_ios_InAppPurchases.cpp +++ b/modules/juce_product_unlocking/native/juce_ios_InAppPurchases.cpp @@ -178,7 +178,7 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver void getProductsInformation (const StringArray& productIdentifiers) { - auto* productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithArray: createNSArrayFromStringArray (productIdentifiers)]]; + auto productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithArray: createNSArrayFromStringArray (productIdentifiers)]]; pendingProductInfoRequests.add (new PendingProductInfoRequest { PendingProductInfoRequest::Type::query, std::unique_ptr (productsRequest) }); @@ -195,8 +195,8 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver return; } - auto* productIdentifiers = [NSArray arrayWithObject: juceStringToNS (productIdentifier)]; - auto* productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:productIdentifiers]]; + auto productIdentifiers = [NSArray arrayWithObject: juceStringToNS (productIdentifier)]; + auto productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:productIdentifiers]]; pendingProductInfoRequests.add (new PendingProductInfoRequest { PendingProductInfoRequest::Type::purchase, std::unique_ptr (productsRequest) }); @@ -213,7 +213,7 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver } else { - auto* receiptRequest = [[SKReceiptRefreshRequest alloc] init]; + auto receiptRequest = [[SKReceiptRefreshRequest alloc] init]; pendingReceiptRefreshRequests.add (new PendingReceiptRefreshRequest { subscriptionsSharedSecret, std::unique_ptr ([receiptRequest retain]) }); @@ -377,7 +377,7 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver jassert ([products count] == 1); auto* product = products[0]; - auto* payment = [SKPayment paymentWithProduct: product]; + auto payment = [SKPayment paymentWithProduct: product]; [[SKPaymentQueue defaultQueue] addPayment: payment]; } else @@ -525,9 +525,9 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver //============================================================================== void processReceiptRefreshResponseWithSubscriptionsSharedSecret (const String& secret) { - auto* receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; + auto receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; - if (auto* receiptData = [NSData dataWithContentsOfURL: receiptURL]) + if (auto receiptData = [NSData dataWithContentsOfURL: receiptURL]) fetchReceiptDetailsFromAppStore (receiptData, secret); else owner.listeners.call ([&] (Listener& l) { l.purchasesListRestored ({}, false, NEEDS_TRANS ("Receipt fetch failed")); }); @@ -535,16 +535,16 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver void fetchReceiptDetailsFromAppStore (NSData* receiptData, const String& secret) { - auto* requestContents = [NSMutableDictionary dictionaryWithCapacity: (NSUInteger) (secret.isNotEmpty() ? 2 : 1)]; + auto requestContents = [NSMutableDictionary dictionaryWithCapacity: (NSUInteger) (secret.isNotEmpty() ? 2 : 1)]; [requestContents setObject: [receiptData base64EncodedStringWithOptions:0] forKey: nsStringLiteral ("receipt-data")]; if (secret.isNotEmpty()) [requestContents setObject: juceStringToNS (secret) forKey: nsStringLiteral ("password")]; NSError* error; - auto* requestData = [NSJSONSerialization dataWithJSONObject: requestContents - options: 0 - error: &error]; + auto requestData = [NSJSONSerialization dataWithJSONObject: requestContents + options: 0 + error: &error]; if (requestData == nil) { sendReceiptFetchFail(); @@ -558,28 +558,28 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver #endif // TODO: use juce URL here - auto* storeRequest = [NSMutableURLRequest requestWithURL: [NSURL URLWithString: nsStringLiteral (storeURL)]]; + auto storeRequest = [NSMutableURLRequest requestWithURL: [NSURL URLWithString: nsStringLiteral (storeURL)]]; [storeRequest setHTTPMethod: nsStringLiteral ("POST")]; [storeRequest setHTTPBody: requestData]; - auto* task = [[NSURLSession sharedSession] dataTaskWithRequest: storeRequest - completionHandler: - ^(NSData* data, NSURLResponse*, NSError* connectionError) - { - if (connectionError != nil) - { - sendReceiptFetchFail(); - } - else - { - NSError* err; - - if (NSDictionary* receiptDetails = [NSJSONSerialization JSONObjectWithData: data options: 0 error: &err]) - processReceiptDetails (receiptDetails); - else - sendReceiptFetchFail(); - } - }]; + auto task = [[NSURLSession sharedSession] dataTaskWithRequest: storeRequest + completionHandler: + ^(NSData* data, NSURLResponse*, NSError* connectionError) + { + if (connectionError != nil) + { + sendReceiptFetchFail(); + } + else + { + NSError* err; + + if (NSDictionary* receiptDetails = [NSJSONSerialization JSONObjectWithData: data options: 0 error: &err]) + processReceiptDetails (receiptDetails); + else + sendReceiptFetchFail(); + } + }]; [task resume]; } @@ -656,7 +656,7 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver } else if (auto dateAsString = getAs (date)) { - auto* formatter = [[NSNumberFormatter alloc] init]; + auto formatter = [[NSNumberFormatter alloc] init]; [formatter setNumberStyle: NSNumberFormatterDecimalStyle]; dateAsNumber = [formatter numberFromString: dateAsString]; [formatter release]; diff --git a/modules/juce_video/native/juce_ios_CameraDevice.h b/modules/juce_video/native/juce_ios_CameraDevice.h index 8724b19270..233775c3de 100644 --- a/modules/juce_video/native/juce_ios_CameraDevice.h +++ b/modules/juce_video/native/juce_ios_CameraDevice.h @@ -402,7 +402,7 @@ private: dispatch_async (captureSessionQueue,^ { cameraDevice = [AVCaptureDevice deviceWithUniqueID: juceStringToNS (cameraIdToUse)]; - auto* audioDevice = [AVCaptureDevice defaultDeviceWithMediaType: AVMediaTypeAudio]; + auto audioDevice = [AVCaptureDevice defaultDeviceWithMediaType: AVMediaTypeAudio]; [captureSession.get() beginConfiguration]; @@ -507,8 +507,8 @@ private: { NSError* error = nil; - auto* input = [AVCaptureDeviceInput deviceInputWithDevice: device - error: &error]; + auto input = [AVCaptureDeviceInput deviceInputWithDevice: device + error: &error]; if (error != nil) return nsStringToJuce (error.localizedDescription); @@ -629,7 +629,7 @@ private: if (Pimpl::getIOSVersion().major >= 10 && [captureOutput isKindOfClass: [AVCapturePhotoOutput class]]) { auto* photoOutput = (AVCapturePhotoOutput*) captureOutput; - auto* outputConnection = [photoOutput connectionWithMediaType: AVMediaTypeVideo]; + auto outputConnection = [photoOutput connectionWithMediaType: AVMediaTypeVideo]; outputConnection.videoOrientation = orientationToUse; [photoOutput capturePhotoWithSettings: [AVCapturePhotoSettings photoSettings] @@ -640,7 +640,7 @@ private: #endif auto* stillImageOutput = (AVCaptureStillImageOutput*) captureOutput; - auto* outputConnection = [stillImageOutput connectionWithMediaType: AVMediaTypeVideo]; + auto outputConnection = [stillImageOutput connectionWithMediaType: AVMediaTypeVideo]; outputConnection.videoOrientation = orientationToUse; [stillImageOutput captureStillImageAsynchronouslyFromConnection: connection completionHandler: @@ -925,7 +925,7 @@ private: } NSData* origImageData = [AVCapturePhotoOutput JPEGPhotoDataRepresentationForJPEGSampleBuffer: imageBuffer previewPhotoSampleBuffer: imagePreviewBuffer]; - auto* origImage = [UIImage imageWithData: origImageData]; + auto origImage = [UIImage imageWithData: origImageData]; auto imageOrientation = uiImageOrientationToCGImageOrientation (origImage.imageOrientation); auto* uiImage = getImageWithCorrectOrientation (imageOrientation, origImage.CGImage); @@ -1009,10 +1009,10 @@ private: if (Pimpl::getIOSVersion().major >= 10) printVideoOutputDebugInfo (movieFileOutput); - auto* url = [NSURL fileURLWithPath: juceStringToNS (file.getFullPathName()) - isDirectory: NO]; + auto url = [NSURL fileURLWithPath: juceStringToNS (file.getFullPathName()) + isDirectory: NO]; - auto* outputConnection = [movieFileOutput connectionWithMediaType: AVMediaTypeVideo]; + auto outputConnection = [movieFileOutput connectionWithMediaType: AVMediaTypeVideo]; outputConnection.videoOrientation = orientationToUse; [movieFileOutput startRecordingToOutputFileURL: url recordingDelegate: delegate.get()]; @@ -1307,7 +1307,7 @@ struct CameraDevice::ViewerComponent : public UIViewComponent // Initial size that can be overriden later. setSize (640, 480); - auto* view = [cls.createInstance() init]; + auto view = [cls.createInstance() init]; setView (view); auto* previewLayer = device.pimpl->captureSession.createPreviewLayer(); diff --git a/modules/juce_video/native/juce_mac_CameraDevice.h b/modules/juce_video/native/juce_mac_CameraDevice.h index 60dc38d168..e22e14861d 100644 --- a/modules/juce_video/native/juce_mac_CameraDevice.h +++ b/modules/juce_video/native/juce_mac_CameraDevice.h @@ -71,7 +71,7 @@ struct CameraDevice::Pimpl if (imageOutput == nil) { imageOutput = [[AVCaptureStillImageOutput alloc] init]; - auto* imageSettings = [[NSDictionary alloc] initWithObjectsAndKeys: AVVideoCodecJPEG, AVVideoCodecKey, nil]; + auto imageSettings = [[NSDictionary alloc] initWithObjectsAndKeys: AVVideoCodecJPEG, AVVideoCodecKey, nil]; [imageOutput setOutputSettings: imageSettings]; [imageSettings release]; [session addOutput: imageOutput]; diff --git a/modules/juce_video/native/juce_mac_Video.h b/modules/juce_video/native/juce_mac_Video.h index cc780b3a29..8d47c1c225 100644 --- a/modules/juce_video/native/juce_mac_Video.h +++ b/modules/juce_video/native/juce_mac_Video.h @@ -292,7 +292,7 @@ private: void loadAsync (URL url) { - auto* nsUrl = [NSURL URLWithString: juceStringToNS (url.toString (true))]; + auto nsUrl = [NSURL URLWithString: juceStringToNS (url.toString (true))]; asset.reset ([[AVURLAsset alloc] initWithURL: nsUrl options: nil]); [asset.get() loadValuesAsynchronouslyForKeys: assetKeys.get() @@ -612,7 +612,7 @@ private: Result load (NSURL* url) { - if (auto* player = [AVPlayer playerWithURL: url]) + if (auto player = [AVPlayer playerWithURL: url]) { setPlayer (player); return Result::ok();