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 | |
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')
-rw-r--r-- | ios/app/MBXViewController.mm | 18 | ||||
-rw-r--r-- | ios/benchmark/MBXBenchViewController.mm | 5 |
2 files changed, 5 insertions, 18 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 diff --git a/ios/benchmark/MBXBenchViewController.mm b/ios/benchmark/MBXBenchViewController.mm index 6e1c6d325c..dfd3b254a3 100644 --- a/ios/benchmark/MBXBenchViewController.mm +++ b/ios/benchmark/MBXBenchViewController.mm @@ -88,11 +88,8 @@ static const int benchmarkDuration = 200; // frames } } -- (void)mapViewDidFinishRenderingMap:(MGLMapView *)mapView fullyRendered:(BOOL)fullyRendered +- (void)mapViewDidFinishRenderingMap:(MGLMapView *)mapView fullyRendered:(__unused BOOL)fullyRendered { - (void)mapView; - (void)fullyRendered; - if (state == State::Benchmarking) { frames++; |