]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Service.hh
constructors should be explicit
[chaz/yoink] / src / Moof / Service.hh
index b26f4cfb375a01433eb9f1c3c5c59a371f0f4028..570a2309e270cb235a7abe7e1b8819d12a7264a6 100644 (file)
@@ -34,25 +34,25 @@ class Service
 public:
 
        /**
-        * Construct a network service.  The type of service will be inferred
-        * from the address.
+        * Construct a network service with an explicit type.
         * \param address The address of the host.
+        * \param type The type of service.
         * \param name The service name.
         * \param text The service information.
         */
        Service(const SocketAddress& address,
+                       const std::string& type,
                        const std::string& name,
                        const std::string& text);
 
        /**
-        * Construct a network service with an explicit type.
+        * Construct a network service.  The type of service will be inferred
+        * from the address.
         * \param address The address of the host.
-        * \param type The type of service.
         * \param name The service name.
         * \param text The service information.
         */
        Service(const SocketAddress& address,
-                       const std::string& type,
                        const std::string& name,
                        const std::string& text);
 
@@ -110,7 +110,7 @@ public:
 
 private:
 
-       int handlePacket(SocketMultiplexer& sock,
+       int handlePacket(SocketMultiplexer& mux,
                                         Packet& packet,
                                         const SocketAddress& address);
 
@@ -130,14 +130,15 @@ public:
         * address.
         * \address The address.
         */
-       ServiceFinder(const SocketAddress& address);
+       explicit ServiceFinder(const SocketAddress& address);
 
        /**
         * Construct a service finder to find services of a certain type.
         * \param type The type of the service.
         * \param sockType The type of socket.
         */
-       ServiceFinder(const std::string& type, int sockType = SOCK_STREAM);
+       explicit ServiceFinder(const std::string& type,
+                                                  int sockType = SOCK_STREAM);
 
 
        const std::map<std::string,Service>& services() const
@@ -148,7 +149,7 @@ public:
 
 private:
 
-       int handlePacket(SocketMultiplexer& sock,
+       int handlePacket(SocketMultiplexer& mux,
                                         Packet& packet,
                                         const SocketAddress& address);
 
This page took 0.018134 seconds and 4 git commands to generate.