LocalPlayer::accelerateHorizontal: cleanups
[oweals/minetest.git] / src / socket.h
index c7dd78f66f8c8602491e486fe2e0ad543372e17d..b1f1e0875c4d7a842eed2ec8173981d6522d4b89 100644 (file)
@@ -21,9 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define SOCKET_HEADER
 
 #ifdef _WIN32
-       #ifndef WIN32_LEAN_AND_MEAN
-               #define WIN32_LEAN_AND_MEAN
-       #endif
 #ifndef _WIN32_WINNT
        #define _WIN32_WINNT 0x0501
 #endif
@@ -45,7 +42,7 @@ extern bool socket_enable_debug_output;
 class SocketException : public BaseException
 {
 public:
-       SocketException(const char *s):
+       SocketException(const std::string &s):
                BaseException(s)
        {
        }
@@ -54,7 +51,7 @@ public:
 class ResolveError : public BaseException
 {
 public:
-       ResolveError(const char *s):
+       ResolveError(const std::string &s):
                BaseException(s)
        {
        }
@@ -63,7 +60,7 @@ public:
 class SendFailedException : public BaseException
 {
 public:
-       SendFailedException(const char *s):
+       SendFailedException(const std::string &s):
                BaseException(s)
        {
        }
@@ -103,13 +100,13 @@ public:
        void print(std::ostream *s) const;
        std::string serializeString() const;
 private:
-       unsigned int m_addr_family;
+       unsigned int m_addr_family = 0;
        union
        {
                struct sockaddr_in  ipv4;
                struct sockaddr_in6 ipv6;
        } m_address;
-       u16 m_port; // Port is separate from sockaddr structures
+       u16 m_port = 0; // Port is separate from sockaddr structures
 };
 
 class UDPSocket