summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-01-08 12:56:42 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-01-13 13:38:12 -0800
commitdd3ca81589d1cc990e3bbb951853d6c85a1a9ac1 (patch)
treecba3074d232a2ba63d5354a4bb9233ae26b0cd7b /platform/default
parentf8d3cf41ae585f7d91b00e91ced4fd416b750c7f (diff)
downloadqtlocation-mapboxgl-dd3ca81589d1cc990e3bbb951853d6c85a1a9ac1.tar.gz
[core] Inline sole use of OnlineFileSource::Impl::update
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/online_file_source.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/platform/default/online_file_source.cpp b/platform/default/online_file_source.cpp
index 03de4f2dba..6a65bb44e5 100644
--- a/platform/default/online_file_source.cpp
+++ b/platform/default/online_file_source.cpp
@@ -104,7 +104,6 @@ public:
void cancel(Resource, FileRequest*);
private:
- void update(OnlineFileRequestImpl&);
void startCacheRequest(OnlineFileRequestImpl&);
void startRealRequest(OnlineFileRequestImpl&);
void reschedule(OnlineFileRequestImpl&);
@@ -199,15 +198,6 @@ void OnlineFileSource::Impl::add(Resource resource, FileRequest* req, Callback c
auto& request = *pending.emplace(resource,
std::make_unique<OnlineFileRequestImpl>(resource)).first->second;
- // Trigger a potentially required refresh of this Request
- update(request);
-
- // Add this request as an observer so that it'll get notified when something about this
- // request changes.
- request.addObserver(req, callback);
-}
-
-void OnlineFileSource::Impl::update(OnlineFileRequestImpl& request) {
if (request.getResponse()) {
// We've at least obtained a cache value, potentially we also got a final response.
// The observers have been notified already; send what we have to the new one as well.
@@ -237,6 +227,10 @@ void OnlineFileSource::Impl::update(OnlineFileRequestImpl& request) {
} else {
// There is a request in progress. We just have to wait.
}
+
+ // Add this request as an observer so that it'll get notified when something about this
+ // request changes.
+ request.addObserver(req, callback);
}
void OnlineFileSource::Impl::startCacheRequest(OnlineFileRequestImpl& request) {