summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLOfflineStorage.mm
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-01-26 18:52:44 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-01-27 11:44:16 +0100
commit62ea1f21858c69f6921c775ba7a3de201f0514d8 (patch)
tree7a4da88706e8a5513e1e13e993b2acc212cae3b1 /platform/darwin/src/MGLOfflineStorage.mm
parenta662508ddde4043ece36d8ea9b424368891d892c (diff)
downloadqtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'platform/darwin/src/MGLOfflineStorage.mm')
-rw-r--r--platform/darwin/src/MGLOfflineStorage.mm12
1 files changed, 6 insertions, 6 deletions
diff --git a/platform/darwin/src/MGLOfflineStorage.mm b/platform/darwin/src/MGLOfflineStorage.mm
index 10acc58b25..bdecd101d2 100644
--- a/platform/darwin/src/MGLOfflineStorage.mm
+++ b/platform/darwin/src/MGLOfflineStorage.mm
@@ -161,11 +161,11 @@ NSString * const MGLOfflinePackMaximumCountUserInfoKey = MGLOfflinePackUserInfoK
- (void)dealloc {
[[MGLNetworkConfiguration sharedManager] removeObserver:self forKeyPath:@"apiBaseURL"];
[[MGLAccountManager sharedManager] removeObserver:self forKeyPath:@"accessToken"];
-
+
for (MGLOfflinePack *pack in self.packs) {
[pack invalidate];
}
-
+
delete _mbglFileSource;
_mbglFileSource = nullptr;
}
@@ -210,7 +210,7 @@ NSString * const MGLOfflinePackMaximumCountUserInfoKey = MGLOfflinePackUserInfoK
@"Regions of type %@ are unsupported.", NSStringFromClass([region class])];
return;
}
-
+
const mbgl::OfflineTilePyramidRegionDefinition regionDefinition = [(id <MGLOfflineRegion_Private>)region offlineRegionDefinition];
mbgl::OfflineRegionMetadata metadata(context.length);
[context getBytes:&metadata[0] length:metadata.size()];
@@ -247,7 +247,7 @@ NSString * const MGLOfflinePackMaximumCountUserInfoKey = MGLOfflinePackUserInfoK
completion(nil);
return;
}
-
+
self.mbglFileSource->deleteOfflineRegion(std::move(*mbglOfflineRegion), [&, completion](std::exception_ptr exception) {
NSError *error;
if (exception) {
@@ -269,7 +269,7 @@ NSString * const MGLOfflinePackMaximumCountUserInfoKey = MGLOfflinePackUserInfoK
[pack invalidate];
}
self.packs = [packs mutableCopy];
-
+
for (MGLOfflinePack *pack in packs) {
pack.delegate = self;
}
@@ -312,7 +312,7 @@ NSString * const MGLOfflinePackMaximumCountUserInfoKey = MGLOfflinePackUserInfoK
if (!cachePath) {
return 0;
}
-
+
NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:cachePath error:NULL];
return attributes.fileSize;
}