summaryrefslogtreecommitdiff
path: root/platform/default/online_file_source.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-01-11 16:10:35 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-01-13 13:40:31 -0800
commit716a9c92cbfd75323dab2514c608fbe7563f5b70 (patch)
treeb97aa347b6f2c3070104e0246842adfe5a7e3092 /platform/default/online_file_source.cpp
parent5a7d2fd60ec4bd1639a1223ec5d2c54c534d0392 (diff)
downloadqtlocation-mapboxgl-716a9c92cbfd75323dab2514c608fbe7563f5b70.tar.gz
[core] Inline a temporary variable which is now used only once
Diffstat (limited to 'platform/default/online_file_source.cpp')
-rw-r--r--platform/default/online_file_source.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/platform/default/online_file_source.cpp b/platform/default/online_file_source.cpp
index 84be64a22f..5c987a3edd 100644
--- a/platform/default/online_file_source.cpp
+++ b/platform/default/online_file_source.cpp
@@ -314,8 +314,7 @@ void OnlineFileRequestImpl::scheduleRealRequest(OnlineFileSource::Impl& impl, bo
realRequestTimer.start(timeout, Duration::zero(), [this, &impl] {
assert(!realRequest);
-
- auto callback = [this, &impl](std::shared_ptr<const Response> response_) {
+ realRequest = impl.httpContext->createRequest(resource.url, [this, &impl](std::shared_ptr<const Response> response_) {
realRequest = nullptr;
// Only update the cache for successful or 404 responses.
@@ -347,9 +346,7 @@ void OnlineFileRequestImpl::scheduleRealRequest(OnlineFileSource::Impl& impl, bo
}
scheduleRealRequest(impl);
- };
-
- realRequest = impl.httpContext->createRequest(resource.url, callback, response);
+ }, response);
});
}