From 0a97145d05bf2590a54026d16199833adacdabe0 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Tue, 8 Dec 2015 07:05:16 -0800 Subject: [core] Better C++ usage on RunLoop Follow-up of #3179. --- platform/default/run_loop.cpp | 6 ++---- 1 file 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 async; @@ -118,7 +116,7 @@ LOOP_HANDLE RunLoop::getLoopHandle() { } void RunLoop::push(std::shared_ptr task) { - withMutex([&] { queue.push(task); }); + withMutex([&] { queue.push(std::move(task)); }); impl->async->send(); } -- cgit v1.2.1