From 225b5e01cbadc46727f77ccf185c711b5f6956a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Mon, 11 Aug 2014 07:41:52 -0700 Subject: [PATCH] don't automatically move back to main thread --- include/mbgl/util/filesource.hpp | 6 ++---- src/map/map.cpp | 4 ++-- src/util/filesource.cpp | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) 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