[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

@@ -1,6 +1,7 @@
#pragma once
#include <mbgl/storage/file_source.hpp>
#include <mbgl/util/pass_types.hpp>
namespace mbgl {
@@ -29,7 +30,7 @@ public:
// Returns shared instance of a file source for (type, options) tuple.
// Creates new instance via registered factory if needed. If new instance cannot be
// created, nullptr would be returned.
std::shared_ptr<FileSource> getFileSource(FileSourceType, const ResourceOptions&) noexcept;
PassRefPtr<FileSource> getFileSource(FileSourceType, const ResourceOptions&) noexcept;
// Registers file source factory for a provided FileSourceType type. If factory for the
// same type was already registered, will unregister previously registered factory.