From ba4f5efa09b985f0bab99a53dc9ac27dd6fb94ea Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Wed, 26 Feb 2020 17:47:03 +0200 Subject: [core] OnlineFileSource is never accessed directly --- platform/darwin/src/MGLOfflineStorage.mm | 4 ++-- platform/darwin/src/MGLOfflineStorage_Private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'platform/darwin') diff --git a/platform/darwin/src/MGLOfflineStorage.mm b/platform/darwin/src/MGLOfflineStorage.mm index 275a58f418..4c71286b79 100644 --- a/platform/darwin/src/MGLOfflineStorage.mm +++ b/platform/darwin/src/MGLOfflineStorage.mm @@ -46,7 +46,7 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio @property (nonatomic, strong, readwrite) NSMutableArray *packs; @property (nonatomic) std::shared_ptr mbglDatabaseFileSource; -@property (nonatomic) std::shared_ptr mbglOnlineFileSource; +@property (nonatomic) std::shared_ptr mbglOnlineFileSource; @property (nonatomic) std::shared_ptr mbglFileSource; @property (nonatomic) std::string mbglCachePath; @property (nonatomic, getter=isPaused) BOOL paused; @@ -233,7 +233,7 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio options.withCachePath(_mbglCachePath) .withAssetPath([NSBundle mainBundle].resourceURL.path.UTF8String); _mbglFileSource = mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::ResourceLoader, options); - _mbglOnlineFileSource = std::static_pointer_cast(std::shared_ptr(mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Network, options))); + _mbglOnlineFileSource = mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Network, options); _mbglDatabaseFileSource = std::static_pointer_cast(std::shared_ptr(mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Database, options))); // Observe for changes to the API base URL (and find out the current one). diff --git a/platform/darwin/src/MGLOfflineStorage_Private.h b/platform/darwin/src/MGLOfflineStorage_Private.h index 13bddd7999..c01163e766 100644 --- a/platform/darwin/src/MGLOfflineStorage_Private.h +++ b/platform/darwin/src/MGLOfflineStorage_Private.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN /** The shared online file source object owned by the shared offline storage object. */ -@property (nonatomic) std::shared_ptr mbglOnlineFileSource; +@property (nonatomic) std::shared_ptr mbglOnlineFileSource; /** The shared resource loader file source object owned by the shared offline storage object. -- cgit v1.2.1