Skip to content

Commit

Permalink
Cleanup warnings of -Wpessimizing-move
Browse files Browse the repository at this point in the history
moving a temporary object prevents copy elision. Remove std::move.
  • Loading branch information
howard0su committed Mar 23, 2020
1 parent 9ac2805 commit 964a2e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/DolphinQt/Config/LogWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 964a2e1

Please sign in to comment.