summaryrefslogtreecommitdiff
path: root/platform/glfw
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 /platform/glfw
parent1399040087f9d0b6f2a836fc5e6468c938ebf99b (diff)
downloadqtlocation-mapboxgl-aad13f6a3f998dc5b699b9e09484ca63bb5be6f1.tar.gz
[core] FileSourceManager::getFileSource() returns PassRefPtr
Diffstat (limited to 'platform/glfw')
-rw-r--r--platform/glfw/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/glfw/main.cpp b/platform/glfw/main.cpp
index ded8ee3e1f..784e002a65 100644
--- a/platform/glfw/main.cpp
+++ b/platform/glfw/main.cpp
@@ -107,7 +107,7 @@ int main(int argc, char *argv[]) {
mbgl::ResourceOptions resourceOptions;
resourceOptions.withCachePath(cacheDB).withAccessToken(token);
- auto onlineFileSource =
+ std::shared_ptr<mbgl::FileSource> onlineFileSource =
mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Network, resourceOptions);
if (!settings.online) {
if (onlineFileSource) {
@@ -165,7 +165,7 @@ int main(int argc, char *argv[]) {
});
// Resource loader controls top-level request processing and can resume / pause all managed sources simultaneously.
- auto resourceLoader =
+ std::shared_ptr<mbgl::FileSource> resourceLoader =
mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::ResourceLoader, resourceOptions);
view->setPauseResumeCallback([resourceLoader]() {
static bool isPaused = false;
@@ -180,8 +180,8 @@ int main(int argc, char *argv[]) {
});
// Database file source.
- auto databaseFileSource = std::static_pointer_cast<mbgl::DatabaseFileSource>(
- mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Database, resourceOptions));
+ auto databaseFileSource = std::static_pointer_cast<mbgl::DatabaseFileSource>(std::shared_ptr<mbgl::FileSource>(
+ mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Database, resourceOptions)));
view->setResetCacheCallback([databaseFileSource]() {
databaseFileSource->resetDatabase([](std::exception_ptr ex) {
if (ex) {