improvements

This commit is contained in:
Michele Caini 2016-06-23 16:45:42 +02:00
parent b7f3684c35
commit e5f2e4bded
4 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ public:
}
void start(Callback cb) noexcept {
callback = cb;
callback = std::move(cb);
get<uv_check_t>()->data = this;
auto err = uv_check_start(get<uv_check_t>(), &proto);

View File

@ -62,7 +62,7 @@ public:
using Callback = std::function<void(UVWError)>;
void close(Callback cb) noexcept {
callback = cb;
callback = std::move(cb);
get<uv_handle_t>()->data = this;
uv_close(get<uv_handle_t>(), &proto);
}

View File

@ -42,7 +42,7 @@ public:
// TODO shutdown
void listen(int backlog, CallbackListen cb) noexcept {
listenCallback = cb;
listenCallback = std::move(cb);
this->template get<uv_stream_t>()->data = this;
auto err = uv_listen(this->template get<uv_stream_t>(), backlog, &protoListen);

View File

@ -34,7 +34,7 @@ public:
}
void start(const Time &timeout, const Time &rep, Callback cb) noexcept {
callback = cb;
callback = std::move(cb);
get<uv_timer_t>()->data = this;
auto err = uv_timer_start(get<uv_timer_t>(), &proto, timeout.count(), rep.count());