From 7b39ce95210ceb6640b3a3399dacd1d0e826ac1f Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 18 Feb 2016 10:48:51 -0800 Subject: [core] Remove ThreadContext::getFileSource; instead thread FileSource through --- src/mbgl/tile/vector_tile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mbgl/tile/vector_tile.cpp') diff --git a/src/mbgl/tile/vector_tile.cpp b/src/mbgl/tile/vector_tile.cpp index da070abe2e..9e35debbff 100644 --- a/src/mbgl/tile/vector_tile.cpp +++ b/src/mbgl/tile/vector_tile.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include @@ -182,15 +181,16 @@ util::ptr VectorTileLayer::getFeature(std::size_t i) return std::make_shared(features.at(i), *this); } -VectorTileMonitor::VectorTileMonitor(const TileID& tileID_, float pixelRatio_, const std::string& urlTemplate_) +VectorTileMonitor::VectorTileMonitor(const TileID& tileID_, float pixelRatio_, const std::string& urlTemplate_, FileSource& fileSource_) : tileID(tileID_), pixelRatio(pixelRatio_), - urlTemplate(urlTemplate_) { + urlTemplate(urlTemplate_), + fileSource(fileSource_) { } std::unique_ptr VectorTileMonitor::monitorTile(const GeometryTileMonitor::Callback& callback) { const Resource resource = Resource::tile(urlTemplate, pixelRatio, tileID.x, tileID.y, tileID.sourceZ); - return util::ThreadContext::getFileSource()->request(resource, [callback, this](Response res) { + return fileSource.request(resource, [callback, this](Response res) { if (res.error) { callback(std::make_exception_ptr(std::runtime_error(res.error->message)), nullptr, res.modified, res.expires); } else if (res.notModified) { -- cgit v1.2.1