diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-06-09 10:08:20 -0400 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-07-01 15:21:11 -0700 |
commit | db1202e8e335be540ded48029216ad9884fc5bb9 (patch) | |
tree | b52c47b6a6dd63176884a1a14e5b2d3f81ab12a9 /src/mbgl/map/vector_tile_data.cpp | |
parent | abdf205510b1f2d7b3e0c9b432f17c8c4d71e895 (diff) | |
download | qtlocation-mapboxgl-db1202e8e335be540ded48029216ad9884fc5bb9.tar.gz |
Don't pass Worker& around so much
Diffstat (limited to 'src/mbgl/map/vector_tile_data.cpp')
-rw-r--r-- | src/mbgl/map/vector_tile_data.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/map/vector_tile_data.cpp b/src/mbgl/map/vector_tile_data.cpp index d0f4b131f9..9b04ab371a 100644 --- a/src/mbgl/map/vector_tile_data.cpp +++ b/src/mbgl/map/vector_tile_data.cpp @@ -18,6 +18,7 @@ VectorTileData::VectorTileData(const TileID& id_, float angle, bool collisionDebug) : TileData(id_), + worker(style_.workers), tileWorker(id_, style_, source_.max_zoom, @@ -26,7 +27,6 @@ VectorTileData::VectorTileData(const TileID& id_, source_.tile_size * id.overscaling, angle, collisionDebug)), source(source_), - worker(style_.workers), lastAngle(angle), currentAngle(angle) { } @@ -35,7 +35,7 @@ VectorTileData::~VectorTileData() { cancel(); } -void VectorTileData::request(Worker&, float pixelRatio, const std::function<void()>& callback) { +void VectorTileData::request(float pixelRatio, const std::function<void()>& callback) { std::string url = source.tileURL(id, pixelRatio); state = State::loading; @@ -55,11 +55,11 @@ void VectorTileData::request(Worker&, float pixelRatio, const std::function<void state = State::loaded; data = res.data; - reparse(worker, callback); + reparse(callback); }); } -bool VectorTileData::reparse(Worker&, std::function<void()> callback) { +bool VectorTileData::reparse(std::function<void()> callback) { if (parsing || (state != State::loaded && state != State::partial)) { return false; } |