diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-12-08 07:05:16 -0800 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-12-08 10:23:11 -0800 |
commit | 0a97145d05bf2590a54026d16199833adacdabe0 (patch) | |
tree | c515d66073b10f8b4a5acc3e3e848831d8b12c43 /platform | |
parent | cfd93a803d955c2af041dcdc6d2e6c5cdfcb87bb (diff) | |
download | qtlocation-mapboxgl-0a97145d05bf2590a54026d16199833adacdabe0.tar.gz |
[core] Better C++ usage on RunLoop
Follow-up of #3179.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/default/run_loop.cpp | 6 |
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(); } |