pop() function of std::queue destroys the front object
so it needs to be moved before returning.
Change-Id: I08036b48ec9c6989ea59003ce94c785f721ed378
Signed-off-by: Vibhav Aggarwal <v.aggarwal@samsung.com>
In popFromInput()
{
std::lock_guard<std::mutex> lock(_incoming_queue_mutex);
- In &data = _incoming_queue.front();
+ In data = std::move(_incoming_queue.front());
_incoming_queue.pop();
Out popFromOutput()
{
std::lock_guard<std::mutex> lock(_outgoing_queue_mutex);
- Out &output = _outgoing_queue.front();
+ Out output = std::move(_outgoing_queue.front());
_outgoing_queue.pop();