mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-11-09 23:57:50 +01:00
Make single parameter constructors explicit
This commit is contained in:
4
zmq.hpp
4
zmq.hpp
@@ -108,7 +108,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)
|
||||||
@@ -221,7 +221,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)
|
||||||
|
|||||||
Reference in New Issue
Block a user