Cleanup warnings of -Wpessimizing-move

moving a temporary object prevents copy elision. Remove std::move.
This commit is contained in:
Jun Su 2020-03-23 16:31:01 +08:00
parent 9ac28054df
commit 964a2e1e70

View File

@ -75,7 +75,7 @@ void LogWidget::UpdateLog()
elements_to_push.reserve(std::min(MAX_LOG_LINES_TO_UPDATE, m_log_ring_buffer.size()));
for (size_t i = 0; !m_log_ring_buffer.empty() && i < MAX_LOG_LINES_TO_UPDATE; i++)
elements_to_push.push_back(std::move(m_log_ring_buffer.pop_front()));
elements_to_push.push_back(m_log_ring_buffer.pop_front());
}
for (auto& line : elements_to_push)