[core] Fix performance-no-automatic-move (bonus)

As reported by clang-tidy-10. We don't run clang-tidy-10 yet. We
should probably consider moving the bots at some point so errors
like this won't return.
This commit is contained in:
Thiago Marcos P. Santos
2020-03-27 18:30:35 +02:00
parent cc8b0e1746
commit ea2477f2ea
6 changed files with 10 additions and 9 deletions

View File

@@ -90,8 +90,8 @@ protected:
template <typename TaskFn, typename ReplyFn>
void scheduleAndReplyValue(const TaskFn& task,
const ReplyFn& reply,
const mapbox::base::WeakPtr<Scheduler>& replyScheduler) {
auto scheduled = [replyScheduler, task, reply] {
mapbox::base::WeakPtr<Scheduler> replyScheduler) {
auto scheduled = [replyScheduler = std::move(replyScheduler), task, reply] {
auto lock = replyScheduler.lock();
if (!replyScheduler) return;
auto scheduledReply = [reply, result = task()] { reply(result); };