[core] Pass a value to response callback, not a reference

This commit is contained in:
John Firebaugh
2015-11-12 17:12:19 -08:00
parent 36581f3d30
commit 1caf89c32b
22 changed files with 45 additions and 56 deletions

View File

@@ -182,7 +182,7 @@ VectorTileMonitor::VectorTileMonitor(const SourceInfo& source, const TileID& id,
}
Request* VectorTileMonitor::monitorTile(std::function<void (std::exception_ptr, std::unique_ptr<GeometryTile>)> callback) {
return util::ThreadContext::getFileSource()->request({ Resource::Kind::Tile, url }, [callback, this](const Response& res) {
return util::ThreadContext::getFileSource()->request({ Resource::Kind::Tile, url }, [callback, this](Response res) {
if (res.data && data == res.data) {
// We got the same data again. Abort early.
return;