X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Fsocket.h;h=3e3c2aef13c29dba52f1bbcb27aa1c3eea2ed75d;hb=593c8202bf8c6ecc563aaacf0811aef953b45f09;hp=c55a5390a673d868b51d9e52a9675fee18f79b79;hpb=e900bb4a8fe086fac55ffe51c75915be0003c5e4;p=libs%2Fnet.git diff --git a/source/net/socket.h b/source/net/socket.h index c55a539..3e3c2ae 100644 --- a/source/net/socket.h +++ b/source/net/socket.h @@ -1,10 +1,10 @@ #ifndef MSP_NET_SOCKET_H_ #define MSP_NET_SOCKET_H_ +#include #include #include #include -#include "constants.h" #include "sockaddr.h" namespace Msp { @@ -30,8 +30,8 @@ protected: struct Private; - Private *priv = nullptr; - SockAddr *local_addr = nullptr; + std::unique_ptr priv; + std::unique_ptr local_addr; Socket(const Private &); Socket(Family, int, int); @@ -50,7 +50,7 @@ public: users of the address. */ void bind(const SockAddr &); - bool is_bound() const { return local_addr; } + bool is_bound() const { return static_cast(local_addr); } const SockAddr &get_local_address() const; void set_timeout(const Time::TimeDelta &);