more explicit constructors
[chaz/yoink] / src / Moof / Socket.hh
index 17e841cca87ba4170b82637fe0dd53aecb349581..cc47f32ee41cf46f5c8bd38a8e9363fbc4e1171c 100644 (file)
@@ -95,9 +95,9 @@ public:
         * \param type The type of socket; either SOCK_STREAM or SOCK_DGRAM.
         * \param family The family; can be AF_INET or AF_INET6.
         */
-       SocketAddress(const std::string& service,
-                                 int type = SOCK_STREAM,
-                                 int family = AF_UNSPEC)
+       explicit SocketAddress(const std::string& service,
+                                                  int type = SOCK_STREAM,
+                                                  int family = AF_UNSPEC)
        {
                init(service, type, family);
        }
@@ -527,10 +527,10 @@ public:
         * \param family The family; can be AF_INET or AF_INET6.
         * \param flags The socket options.
         */
-       Socket(const std::string& service,
-                  int type = SOCK_STREAM,
-                  int family = AF_UNSPEC,
-                  int flags = 0) :
+       explicit Socket(const std::string& service,
+                                       int type = SOCK_STREAM,
+                                       int family = AF_UNSPEC,
+                                       int flags = 0) :
                mImpl(SocketAddress(service, type, family), flags) {}
 
 
@@ -921,7 +921,7 @@ public:
                                                                Packet&,
                                                                const SocketAddress&)> Function;
 
-       SocketMultiplexer(Socket sock) :
+       explicit SocketMultiplexer(Socket sock) :
                mSocket(sock) {}
 
 
This page took 0.020259 seconds and 4 git commands to generate.