diff --git a/include/mbgl/util/filesource.hpp b/include/mbgl/util/filesource.hpp index 83e2a635e..0d339cbac 100644 --- a/include/mbgl/util/filesource.hpp +++ b/include/mbgl/util/filesource.hpp @@ -25,16 +25,14 @@ enum class ResourceType : uint8_t { class FileSource { public: - FileSource(const std::shared_ptr &loop); + FileSource(); void setBase(const std::string &value); const std::string &getBase() const; - void load(ResourceType type, const std::string &url, std::function callback); + void load(ResourceType type, const std::string &url, std::function callback, const std::shared_ptr loop = nullptr); private: - std::shared_ptr loop; - // Stores a URL that is used as a base for loading resources with relative path. std::string base; diff --git a/src/map/map.cpp b/src/map/map.cpp index 7936eaf30..ef7b9548b 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -34,7 +34,7 @@ Map::Map(View& view) : loop(std::make_shared()), view(view), transform(view), - fileSource(std::make_shared(loop)), + fileSource(std::make_shared()), style(std::make_shared