Merge pull request #10 from ricnewton/explicit-constructors

Make single parameter constructors explicit
This commit is contained in:
Pieter Hintjens 2013-01-05 03:22:29 -08:00
commit 127c255d65

View File

@ -114,7 +114,7 @@ namespace zmq
throw error_t (); throw error_t ();
} }
inline message_t (size_t size_) inline explicit message_t (size_t size_)
{ {
int rc = zmq_msg_init_size (&msg, size_); int rc = zmq_msg_init_size (&msg, size_);
if (rc != 0) if (rc != 0)
@ -227,7 +227,7 @@ namespace zmq
public: public:
inline context_t (int io_threads_) inline explicit context_t (int io_threads_)
{ {
ptr = zmq_init (io_threads_); ptr = zmq_init (io_threads_);
if (ptr == NULL) if (ptr == NULL)