summaryrefslogtreecommitdiff
path: root/platform/default/run_loop.cpp
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-12-08 07:05:16 -0800
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-12-08 10:23:11 -0800
commit0a97145d05bf2590a54026d16199833adacdabe0 (patch)
treec515d66073b10f8b4a5acc3e3e848831d8b12c43 /platform/default/run_loop.cpp
parentcfd93a803d955c2af041dcdc6d2e6c5cdfcb87bb (diff)
downloadqtlocation-mapboxgl-0a97145d05bf2590a54026d16199833adacdabe0.tar.gz
[core] Better C++ usage on RunLoop
Follow-up of #3179.
Diffstat (limited to 'platform/default/run_loop.cpp')
-rw-r--r--platform/default/run_loop.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/platform/default/run_loop.cpp b/platform/default/run_loop.cpp
index a5de305998..158d54d2db 100644
--- a/platform/default/run_loop.cpp
+++ b/platform/default/run_loop.cpp
@@ -56,9 +56,7 @@ RunLoop* RunLoop::Get() {
class RunLoop::Impl {
public:
- Impl() = default;
-
- uv_loop_t *loop;
+ uv_loop_t *loop = nullptr;
RunLoop::Type type;
std::unique_ptr<AsyncTask> async;
@@ -118,7 +116,7 @@ LOOP_HANDLE RunLoop::getLoopHandle() {
}
void RunLoop::push(std::shared_ptr<WorkTask> task) {
- withMutex([&] { queue.push(task); });
+ withMutex([&] { queue.push(std::move(task)); });
impl->async->send();
}