mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-13 10:52:57 +01: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_);
|
||||
if (nbytes >= 0)
|
||||
return (size_t) nbytes;
|
||||
return static_cast<size_t>(nbytes);
|
||||
if (zmq_errno() == EAGAIN)
|
||||
return 0;
|
||||
throw error_t();
|
||||
@ -790,7 +790,7 @@ class socket_t
|
||||
{
|
||||
int nbytes = zmq_recv(ptr, buf_, len_, flags_);
|
||||
if (nbytes >= 0)
|
||||
return (size_t) nbytes;
|
||||
return static_cast<size_t>(nbytes);
|
||||
if (zmq_errno() == EAGAIN)
|
||||
return 0;
|
||||
throw error_t();
|
||||
|
Loading…
Reference in New Issue
Block a user