From 9139be8ebf5ae48d194bfd3e8529f57600796c4d Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Wed, 18 Jan 2017 09:52:17 +0100 Subject: [PATCH] Update dns.hpp --- src/uvw/dns.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/uvw/dns.hpp b/src/uvw/dns.hpp index 52eb8571..e1e79543 100644 --- a/src/uvw/dns.hpp +++ b/src/uvw/dns.hpp @@ -22,8 +22,8 @@ namespace uvw { struct AddrInfoEvent: Event { using Deleter = void(*)(addrinfo *); - AddrInfoEvent(std::unique_ptr _data) - : data{std::move(_data)} + AddrInfoEvent(std::unique_ptr addr) + : data{std::move(addr)} {} /** @@ -42,8 +42,8 @@ struct AddrInfoEvent: Event { * It will be emitted by GetNameInfoReq according with its functionalities. */ struct NameInfoEvent: Event { - NameInfoEvent(const char *_hostname, const char *_service) - : hostname{_hostname}, service{_service} + NameInfoEvent(const char *host, const char *serv) + : hostname{host}, service{serv} {} /** @@ -80,7 +80,7 @@ class GetAddrInfoReq final: public Request { ptr->publish(ErrorEvent{status}); } else { auto data = std::unique_ptr{ - res, [](addrinfo *_res){ uv_freeaddrinfo(_res); }}; + res, [](addrinfo *addr){ uv_freeaddrinfo(addr); }}; ptr->publish(AddrInfoEvent{std::move(data)}); } @@ -93,8 +93,8 @@ class GetAddrInfoReq final: public Request { auto getNodeAddrInfoSync(const char *node, const char *service, addrinfo *hints = nullptr) { auto req = get(); auto err = uv_getaddrinfo(parent(), req, nullptr, node, service, hints); - auto _ptr = std::unique_ptr{req->addrinfo, [](addrinfo *_res){ uv_freeaddrinfo(_res); }}; - return std::make_pair(!err, std::move(_ptr)); + auto data = std::unique_ptr{req->addrinfo, [](addrinfo *addr){ uv_freeaddrinfo(addr); }}; + return std::make_pair(!err, std::move(data)); } public: