From aad13f6a3f998dc5b699b9e09484ca63bb5be6f1 Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Tue, 25 Feb 2020 22:25:10 +0200 Subject: [core] FileSourceManager::getFileSource() returns PassRefPtr --- platform/glfw/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'platform/glfw') 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 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 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::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Database, resourceOptions)); + auto databaseFileSource = std::static_pointer_cast(std::shared_ptr( + mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Database, resourceOptions))); view->setResetCacheCallback([databaseFileSource]() { databaseFileSource->resetDatabase([](std::exception_ptr ex) { if (ex) { -- cgit v1.2.1