diff --git a/src/uvw/udp.cpp b/src/uvw/udp.cpp index 1926f6f8..6cc0d1f4 100644 --- a/src/uvw/udp.cpp +++ b/src/uvw/udp.cpp @@ -8,7 +8,7 @@ namespace uvw { -UVW_INLINE UDPDataEvent::UDPDataEvent(Addr sndr, std::unique_ptr buf, std::size_t len, bool part) noexcept +UVW_INLINE UDPDataEvent::UDPDataEvent(Addr sndr, std::unique_ptr buf, std::size_t len, bool part) noexcept : data{std::move(buf)}, length{len}, sender{std::move(sndr)}, partial{part} {} diff --git a/src/uvw/udp.h b/src/uvw/udp.h index 68769a89..d3cccf66 100644 --- a/src/uvw/udp.h +++ b/src/uvw/udp.h @@ -30,9 +30,9 @@ struct SendEvent {}; * It will be emitted by UDPHandle according with its functionalities. */ struct UDPDataEvent { - explicit UDPDataEvent(Addr sndr, std::unique_ptr buf, std::size_t len, bool part) noexcept; + explicit UDPDataEvent(Addr sndr, std::unique_ptr buf, std::size_t len, bool part) noexcept; - std::unique_ptr data; /*!< A bunch of data read on the stream. */ + std::unique_ptr data; /*!< A bunch of data read on the stream. */ std::size_t length; /*!< The amount of data read on the stream. */ Addr sender; /*!< A valid instance of Addr. */ bool partial; /*!< True if the message was truncated, false otherwise. */ @@ -97,7 +97,7 @@ class UDPHandle final: public Handle { UDPHandle &udp = *(static_cast(handle->data)); // data will be destroyed no matter of what the value of nread is - std::unique_ptr data{buf->base}; + std::unique_ptr data{buf->base}; if(nread > 0) { // data available (can be truncated)