From 1cb8e455fb9abb8a36b53ad26c644420bae0650e Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Fri, 23 Dec 2016 13:03:03 +0100 Subject: [PATCH] fix(controller): Invalid move constructions Refs #268, #265 --- src/components/controller.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/controller.cpp b/src/components/controller.cpp index 9ef6d280..694ca6d8 100644 --- a/src/components/controller.cpp +++ b/src/components/controller.cpp @@ -201,7 +201,7 @@ bool controller::run(bool writeback) { * Enqueue event */ bool controller::enqueue(event&& evt) { - if (!m_queue.enqueue(move(evt))) { + if (!m_queue.enqueue(forward(evt))) { m_log.warn("Failed to enqueue event"); return false; } @@ -220,7 +220,7 @@ bool controller::enqueue(string&& input_data) { } else if (chrono::system_clock::now() - m_swallow_input < m_lastinput) { m_log.trace("controller: Swallowing input event (throttled)"); } else { - m_inputdata = move(input_data); + m_inputdata = input_data; return enqueue(make_input_evt()); } return false; @@ -363,7 +363,7 @@ void controller::process_eventqueue() { */ void controller::process_inputdata() { if (!m_inputdata.empty()) { - auto evt = sig_ev::process_input{move(m_inputdata)}; + auto evt = sig_ev::process_input{string{m_inputdata}}; m_lastinput = chrono::time_point_cast(chrono::system_clock::now()); m_inputdata.clear();