X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=blobdiff_plain;f=source%2Fnet%2Fsocket.h;fp=source%2Fnet%2Fsocket.h;h=7a47793eab9515f9871446c03c5cc612753c6fa7;hp=c55a5390a673d868b51d9e52a9675fee18f79b79;hb=ede42d5bb352841e2e425972e12b8ef31ddf2123;hpb=1565dec0f4a86e4bda7095dd7415234f7c7a84e9 diff --git a/source/net/socket.h b/source/net/socket.h index c55a539..7a47793 100644 --- a/source/net/socket.h +++ b/source/net/socket.h @@ -1,6 +1,7 @@ #ifndef MSP_NET_SOCKET_H_ #define MSP_NET_SOCKET_H_ +#include #include #include #include @@ -30,8 +31,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 +51,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 &);