[wpiutil] uv: use move for std::function (#3653)

Also use function_ref for Loop::Walk().
This commit is contained in:
Peter Johnson
2021-10-20 23:24:59 -07:00
committed by GitHub
parent 75fa1fbfbf
commit ac2f44da33
22 changed files with 55 additions and 42 deletions

View File

@@ -39,10 +39,10 @@ void QueueWork(Loop& loop, std::function<void()> work,
std::function<void()> afterWork) {
auto req = std::make_shared<WorkReq>();
if (work) {
req->work.connect(work);
req->work.connect(std::move(work));
}
if (afterWork) {
req->afterWork.connect(afterWork);
req->afterWork.connect(std::move(afterWork));
}
QueueWork(loop, req);
}