From f80d2dbddc17ce7ee236383d3e5831f6e7ae9578 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Tue, 23 Jan 2018 14:43:25 +0300 Subject: [PATCH] [cleanup] [ios] Fixed compilation warnings. --- indexer/categories_holder.hpp | 2 +- .../Views/RoutePreview/MWMRoutePreview.h | 2 -- iphone/Maps/Classes/MapsAppDelegate.mm | 18 ++++++------------ .../Cells/MWMMapDownloaderTableViewCell.mm | 2 +- .../MWMMobileInternetViewController.mm | 2 +- .../Maps/UI/Settings/MWMNightModeController.mm | 2 +- .../UI/Storyboard/SearchFilters.storyboard | 6 +++--- 7 files changed, 13 insertions(+), 21 deletions(-) diff --git a/indexer/categories_holder.hpp b/indexer/categories_holder.hpp index 9d3562f6a6..9feff6dd4b 100644 --- a/indexer/categories_holder.hpp +++ b/indexer/categories_holder.hpp @@ -85,7 +85,7 @@ public: template void ForEachTypeAndCategory(ToDo && toDo) const { - for (auto const it : m_type2cat) + for (auto const & it : m_type2cat) toDo(it.first, *it.second); } diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.h index b1511b8386..5ab706ce71 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.h +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.h @@ -15,6 +15,4 @@ - (void)router:(MWMRouterType)routerType setState:(MWMCircularProgressState)state; - (void)router:(MWMRouterType)routerType setProgress:(CGFloat)progress; -- (CGRect)defaultFrame; - @end diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index 25f631b48c..5ff6a0f152 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -678,7 +678,7 @@ using namespace osm_auth_ios; NSForegroundColorAttributeName : [UIColor lightGrayColor], } forState:UIControlStateDisabled]; - [UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil].tintColor = [UIColor whitePrimaryText]; + [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UINavigationBar class]]].tintColor = [UIColor whitePrimaryText]; UIPageControl * pageControl = [UIPageControl appearance]; pageControl.pageIndicatorTintColor = [UIColor blackHintText]; @@ -707,12 +707,9 @@ using namespace osm_auth_ios; [[LocalNotificationManager sharedManager] processNotification:notification onLaunch:NO]; } -- (BOOL)application:(UIApplication *)application - openURL:(NSURL *)url - sourceApplication:(NSString *)sourceApplication - annotation:(id)annotation +- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { - m_sourceApplication = sourceApplication; + m_sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey]; if ([self checkLaunchURL:url]) { @@ -721,15 +718,12 @@ using namespace osm_auth_ios; } BOOL isGoogleURL = [[GIDSignIn sharedInstance] handleURL:url - sourceApplication:sourceApplication - annotation:annotation]; + sourceApplication:m_sourceApplication + annotation:options[UIApplicationOpenURLOptionsAnnotationKey]]; if (isGoogleURL) return YES; - return [[FBSDKApplicationDelegate sharedInstance] application:application - openURL:url - sourceApplication:sourceApplication - annotation:annotation]; + return [[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]; } - (BOOL)checkLaunchURL:(NSURL *)url diff --git a/iphone/Maps/UI/Downloader/Cells/MWMMapDownloaderTableViewCell.mm b/iphone/Maps/UI/Downloader/Cells/MWMMapDownloaderTableViewCell.mm index 449c2de6e6..a54815a783 100644 --- a/iphone/Maps/UI/Downloader/Cells/MWMMapDownloaderTableViewCell.mm +++ b/iphone/Maps/UI/Downloader/Cells/MWMMapDownloaderTableViewCell.mm @@ -62,7 +62,7 @@ selectedAttrs:selectedTitleAttrs unselectedAttrs:unselectedTitleAttrs]; - TMwmSize size = nodeAttrs.m_mwmSize; + TMwmSize size; bool const isModeDownloaded = self.mode == MWMMapDownloaderModeDownloaded; switch (nodeAttrs.m_status) diff --git a/iphone/Maps/UI/Settings/MWMMobileInternetViewController.mm b/iphone/Maps/UI/Settings/MWMMobileInternetViewController.mm index 46593c221f..8764796c42 100644 --- a/iphone/Maps/UI/Settings/MWMMobileInternetViewController.mm +++ b/iphone/Maps/UI/Settings/MWMMobileInternetViewController.mm @@ -39,7 +39,7 @@ using np = platform::NetworkPolicy; return; _selected = selected; - NSString * statValue = nil; + NSString * statValue = @""; if ([selected isEqual:self.always]) { statValue = kStatAlways; diff --git a/iphone/Maps/UI/Settings/MWMNightModeController.mm b/iphone/Maps/UI/Settings/MWMNightModeController.mm index c342587c31..4f68f462c5 100644 --- a/iphone/Maps/UI/Settings/MWMNightModeController.mm +++ b/iphone/Maps/UI/Settings/MWMNightModeController.mm @@ -37,7 +37,7 @@ return; _selectedCell = cell; - NSString * statValue = nil; + NSString * statValue = @""; if ([cell isEqual:self.on]) { [MWMSettings setTheme:MWMThemeNight]; diff --git a/iphone/Maps/UI/Storyboard/SearchFilters.storyboard b/iphone/Maps/UI/Storyboard/SearchFilters.storyboard index 28dd582b9a..032c1decc7 100644 --- a/iphone/Maps/UI/Storyboard/SearchFilters.storyboard +++ b/iphone/Maps/UI/Storyboard/SearchFilters.storyboard @@ -33,7 +33,7 @@ - + @@ -67,7 +67,7 @@ -