[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

@@ -15,6 +15,7 @@
#include <utility>
#include "wpi/Signal.h"
#include "wpi/function_ref.h"
#include "wpi/uv/Error.h"
namespace wpi::uv {
@@ -171,7 +172,7 @@ class Loop final : public std::enable_shared_from_this<Loop> {
*
* @param callback A function to be invoked once for each active handle.
*/
void Walk(std::function<void(Handle&)> callback);
void Walk(function_ref<void(Handle&)> callback);
/**
* Reinitialize any kernel state necessary in the child process after