diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-02-16 18:30:19 -0800 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-02-16 18:30:19 -0800 |
commit | fe0baffe0dfbf369f422e175c0fcf3dda9055118 (patch) | |
tree | d404bd67ec2b338f37e4de958c74c44c841a77b5 /src | |
parent | 8d3c2b3d303adaf2c9caa91356183d9b40cdfeab (diff) | |
download | qtlocation-mapboxgl-fe0baffe0dfbf369f422e175c0fcf3dda9055118.tar.gz |
update uv_zip and add tests
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/storage/default_file_source.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mbgl/storage/default_file_source.cpp b/src/mbgl/storage/default_file_source.cpp index e40aaff649..6d27adbe0e 100644 --- a/src/mbgl/storage/default_file_source.cpp +++ b/src/mbgl/storage/default_file_source.cpp @@ -4,6 +4,7 @@ #include <mbgl/storage/default/http_request.hpp> #include <mbgl/storage/response.hpp> +#include <mbgl/platform/platform.hpp> #include <mbgl/util/async_queue.hpp> #include <mbgl/util/util.hpp> @@ -49,8 +50,9 @@ struct DefaultFileSource::StopAction { }; -DefaultFileSource::DefaultFileSource(FileCache *cache_) - : loop(uv_loop_new()), +DefaultFileSource::DefaultFileSource(FileCache *cache_, const std::string &root) + : assetRoot(root.empty() ? platform::assetRoot() : root), + loop(uv_loop_new()), cache(cache_), queue(new Queue(loop, [this](Action &action) { mapbox::util::apply_visitor(ActionDispatcher{*this}, action); @@ -63,8 +65,9 @@ DefaultFileSource::DefaultFileSource(FileCache *cache_) }) { } -DefaultFileSource::DefaultFileSource(FileCache *cache_, uv_loop_t *loop_) - : loop(loop_), +DefaultFileSource::DefaultFileSource(FileCache *cache_, uv_loop_t *loop_, const std::string &root) + : assetRoot(root.empty() ? platform::assetRoot() : root), + loop(loop_), cache(cache_), queue(new Queue(loop, [this](Action &action) { mapbox::util::apply_visitor(ActionDispatcher{*this}, action); |