[core] FileSourceManager::getFileSource() returns PassRefPtr

This commit is contained in:
Mikhail Pozdnyakov
2020-02-25 22:25:10 +02:00
parent 1399040087
commit aad13f6a3f
15 changed files with 69 additions and 48 deletions

View File

@@ -41,10 +41,10 @@ FileSource::FileSource(jni::JNIEnv& _env, const jni::String& accessToken, const
// TODO: Split Android FileSource API to smaller interfaces
resourceLoader =
mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::ResourceLoader, resourceOptions);
databaseSource = std::static_pointer_cast<mbgl::DatabaseFileSource>(
mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Database, resourceOptions));
onlineSource = std::static_pointer_cast<mbgl::OnlineFileSource>(
mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Network, resourceOptions));
databaseSource = std::static_pointer_cast<mbgl::DatabaseFileSource>(std::shared_ptr<mbgl::FileSource>(
mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Database, resourceOptions)));
onlineSource = std::static_pointer_cast<mbgl::OnlineFileSource>(std::shared_ptr<mbgl::FileSource>(
mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Network, resourceOptions)));
}
FileSource::~FileSource() {