diff options
Diffstat (limited to 'platform/glfw/main.cpp')
-rw-r--r-- | platform/glfw/main.cpp | 8 |
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) { |