summaryrefslogtreecommitdiff
path: root/src/mbgl/storage/base_request.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/storage/base_request.cpp')
-rw-r--r--src/mbgl/storage/base_request.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/storage/base_request.cpp b/src/mbgl/storage/base_request.cpp
index 5ce206996c..510bd7bf1c 100644
--- a/src/mbgl/storage/base_request.cpp
+++ b/src/mbgl/storage/base_request.cpp
@@ -19,13 +19,13 @@ void invoke(const std::forward_list<std::unique_ptr<Callback>> &list, Args&& ...
}
}
-BaseRequest::BaseRequest(const std::string &path_) : thread_id(std::this_thread::get_id()), path(path_) {
+BaseRequest::BaseRequest(const std::string &path_) : threadId(std::this_thread::get_id()), path(path_) {
}
// A base request can only be "canceled" by destroying the object. In that case, we'll have to
// notify all cancel callbacks.
BaseRequest::~BaseRequest() {
- assert(thread_id == std::this_thread::get_id());
+ assert(std::this_thread::get_id() == threadId);
notify();
}
@@ -34,7 +34,7 @@ void BaseRequest::retryImmediately() {
}
void BaseRequest::notify() {
- assert(thread_id == std::this_thread::get_id());
+ assert(std::this_thread::get_id() == threadId);
// The parameter exists solely so that any calls to ->remove()
// are not going to cause deallocation of this object while this call is in progress.
@@ -55,7 +55,7 @@ void BaseRequest::notify() {
}
Callback *BaseRequest::add(Callback &&callback, const util::ptr<BaseRequest> &request) {
- assert(thread_id == std::this_thread::get_id());
+ assert(std::this_thread::get_id() == threadId);
assert(this == request.get());
if (response) {
@@ -75,7 +75,7 @@ Callback *BaseRequest::add(Callback &&callback, const util::ptr<BaseRequest> &re
}
void BaseRequest::remove(Callback *callback) {
- assert(thread_id == std::this_thread::get_id());
+ assert(std::this_thread::get_id() == threadId);
callbacks.remove_if([=](const std::unique_ptr<Callback> &cb) {
return cb.get() == callback;
});