mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
[wpiutil] uv: use move for std::function (#3653)
Also use function_ref for Loop::Walk().
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user