diff --git a/src/uvw/resource.hpp b/src/uvw/resource.hpp index 4bc1d09a..e780fd96 100644 --- a/src/uvw/resource.hpp +++ b/src/uvw/resource.hpp @@ -83,13 +83,12 @@ public: /** * @brief Creates a new resource of the given type. - * @param loop A pointer to the loop from which the handle generated. * @param args Arguments to be forwarded to the actual constructor (if any). * @return A pointer to the newly created resource. */ template - static std::shared_ptr create(std::shared_ptr loop, Args&&... args) { - return std::make_shared(ConstructorAccess{0}, std::move(loop), std::forward(args)...); + static std::shared_ptr create(Args&&... args) { + return std::make_shared(ConstructorAccess{0}, std::forward(args)...); } /** diff --git a/src/uvw/tcp.hpp b/src/uvw/tcp.hpp index 64f1237f..72cfc4ff 100644 --- a/src/uvw/tcp.hpp +++ b/src/uvw/tcp.hpp @@ -50,9 +50,7 @@ public: using IPv4 = uvw::IPv4; using IPv6 = uvw::IPv6; - explicit TcpHandle(ConstructorAccess ca, std::shared_ptr ref) - : StreamHandle{std::move(ca), std::move(ref)}, tag{DEFAULT}, flags{} - { } + using StreamHandle::StreamHandle; explicit TcpHandle(ConstructorAccess ca, std::shared_ptr ref, unsigned int f) : StreamHandle{std::move(ca), std::move(ref)}, tag{FLAGS}, flags{f} @@ -220,8 +218,8 @@ public: } private: - enum { DEFAULT, FLAGS } tag; - unsigned int flags; + enum { DEFAULT, FLAGS } tag{DEFAULT}; + unsigned int flags{}; }; diff --git a/src/uvw/udp.hpp b/src/uvw/udp.hpp index 1816bc04..5777af8e 100644 --- a/src/uvw/udp.hpp +++ b/src/uvw/udp.hpp @@ -135,9 +135,7 @@ public: using IPv4 = uvw::IPv4; using IPv6 = uvw::IPv6; - explicit UDPHandle(ConstructorAccess ca, std::shared_ptr ref) - : Handle{std::move(ca), std::move(ref)}, tag{DEFAULT}, flags{} - { } + using Handle::Handle; explicit UDPHandle(ConstructorAccess ca, std::shared_ptr ref, unsigned int f) : Handle{std::move(ca), std::move(ref)}, tag{FLAGS}, flags{f} @@ -371,8 +369,8 @@ public: } private: - enum { DEFAULT, FLAGS } tag; - unsigned int flags; + enum { DEFAULT, FLAGS } tag{DEFAULT}; + unsigned int flags{}; };