summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-02-25 22:25:10 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-02-26 22:31:59 +0200
commitaad13f6a3f998dc5b699b9e09484ca63bb5be6f1 (patch)
treec2de65ea2cb23bb5c1740f55a92d85eaae8f2e83 /src
parent1399040087f9d0b6f2a836fc5e6468c938ebf99b (diff)
downloadqtlocation-mapboxgl-aad13f6a3f998dc5b699b9e09484ca63bb5be6f1.tar.gz
[core] FileSourceManager::getFileSource() returns PassRefPtr
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map.cpp4
-rw-r--r--src/mbgl/storage/file_source_manager.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 0d9574a299..7e72595149 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -33,7 +33,9 @@ Map::Map(RendererFrontend& frontend,
: impl(std::make_unique<Impl>(
frontend,
observer,
- FileSourceManager::get() ? FileSourceManager::get()->getFileSource(ResourceLoader, resourceOptions) : nullptr,
+ FileSourceManager::get()
+ ? std::shared_ptr<FileSource>(FileSourceManager::get()->getFileSource(ResourceLoader, resourceOptions))
+ : nullptr,
mapOptions)) {}
Map::Map(std::unique_ptr<Impl> impl_) : impl(std::move(impl_)) {}
diff --git a/src/mbgl/storage/file_source_manager.cpp b/src/mbgl/storage/file_source_manager.cpp
index 62fd5e8f98..6689d5314a 100644
--- a/src/mbgl/storage/file_source_manager.cpp
+++ b/src/mbgl/storage/file_source_manager.cpp
@@ -30,8 +30,7 @@ FileSourceManager::FileSourceManager() : impl(std::make_unique<Impl>()) {}
FileSourceManager::~FileSourceManager() = default;
-std::shared_ptr<FileSource> FileSourceManager::getFileSource(FileSourceType type,
- const ResourceOptions& options) noexcept {
+PassRefPtr<FileSource> FileSourceManager::getFileSource(FileSourceType type, const ResourceOptions& options) noexcept {
std::lock_guard<std::recursive_mutex> lock(impl->mutex);
// Remove released file sources.