diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-05-10 00:01:35 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-05-18 17:11:12 -0700 |
commit | b7b4515d4883f7da1fdcfb4d5aff7a2f3118ae86 (patch) | |
tree | 0d0cee369d74946c0b8f562fc080a71655111c91 /ios/app | |
parent | 63ea3d4befe7f2a8958cf3496d31d2a71561801b (diff) | |
download | qtlocation-mapboxgl-b7b4515d4883f7da1fdcfb4d5aff7a2f3118ae86.tar.gz |
Marked unused parameters with __unused
Replaced haphazard usage of pragmas and `(void)` expressions with the `__unused` keyword.
Diffstat (limited to 'ios/app')
-rw-r--r-- | ios/app/MBXViewController.mm | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/ios/app/MBXViewController.mm b/ios/app/MBXViewController.mm index eb77a2ec80..9ccda7ac6d 100644 --- a/ios/app/MBXViewController.mm +++ b/ios/app/MBXViewController.mm @@ -83,10 +83,7 @@ mbgl::Settings_NSUserDefaults *settings = nullptr; [self restoreState:nil]; } -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" - -- (void)saveState:(NSNotification *)notification +- (void)saveState:(__unused NSNotification *)notification { if (self.mapView && settings) { @@ -101,7 +98,7 @@ mbgl::Settings_NSUserDefaults *settings = nullptr; } } -- (void)restoreState:(NSNotification *)notification +- (void)restoreState:(__unused NSNotification *)notification { if (self.mapView && settings) { settings->load(); @@ -113,8 +110,6 @@ mbgl::Settings_NSUserDefaults *settings = nullptr; } } -#pragma clang diagnostic pop - - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskAll; @@ -277,17 +272,14 @@ mbgl::Settings_NSUserDefaults *settings = nullptr; } } -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-parameter" - #pragma mark - MGLMapViewDelegate -- (BOOL)mapView:(MGLMapView *)mapView annotationCanShowCallout:(id <MGLAnnotation>)annotation +- (BOOL)mapView:(__unused MGLMapView *)mapView annotationCanShowCallout:(__unused id <MGLAnnotation>)annotation { return YES; } -- (void)mapView:(MGLMapView *)mapView didChangeUserTrackingMode:(MGLUserTrackingMode)mode animated:(BOOL)animated +- (void)mapView:(__unused MGLMapView *)mapView didChangeUserTrackingMode:(MGLUserTrackingMode)mode animated:(__unused BOOL)animated { UIImage *newButtonImage; @@ -310,6 +302,4 @@ mbgl::Settings_NSUserDefaults *settings = nullptr; }]; } -#pragma clang diagnostic pop - @end |