mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-12 18:40:28 +01:00
Merge pull request #10 from ricnewton/explicit-constructors
Make single parameter constructors explicit
This commit is contained in:
commit
127c255d65
4
zmq.hpp
4
zmq.hpp
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user