mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-05-20 04:57:45 +02:00
Merge pull request #316 from texierp/fix/cast
Use C++ cast instead of old style cast
This commit is contained in:
commit
9eef00e479
4
zmq.hpp
4
zmq.hpp
@ -760,7 +760,7 @@ class socket_t
|
|||||||
{
|
{
|
||||||
int nbytes = zmq_send(ptr, buf_, len_, flags_);
|
int nbytes = zmq_send(ptr, buf_, len_, flags_);
|
||||||
if (nbytes >= 0)
|
if (nbytes >= 0)
|
||||||
return (size_t) nbytes;
|
return static_cast<size_t>(nbytes);
|
||||||
if (zmq_errno() == EAGAIN)
|
if (zmq_errno() == EAGAIN)
|
||||||
return 0;
|
return 0;
|
||||||
throw error_t();
|
throw error_t();
|
||||||
@ -790,7 +790,7 @@ class socket_t
|
|||||||
{
|
{
|
||||||
int nbytes = zmq_recv(ptr, buf_, len_, flags_);
|
int nbytes = zmq_recv(ptr, buf_, len_, flags_);
|
||||||
if (nbytes >= 0)
|
if (nbytes >= 0)
|
||||||
return (size_t) nbytes;
|
return static_cast<size_t>(nbytes);
|
||||||
if (zmq_errno() == EAGAIN)
|
if (zmq_errno() == EAGAIN)
|
||||||
return 0;
|
return 0;
|
||||||
throw error_t();
|
throw error_t();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user