mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-10-24 17:30:47 +02:00
Problem: poller_t::wait_all and active_poller_t::wait declare int return type but actually return an element count
Solution: change return type to size_t, remove a redundant if in consequence
This commit is contained in:
6
zmq.hpp
6
zmq.hpp
@@ -1091,14 +1091,14 @@ template <typename T = void> class poller_t
|
||||
}
|
||||
}
|
||||
|
||||
int wait_all (std::vector<zmq_poller_event_t> &poller_events,
|
||||
const std::chrono::microseconds timeout)
|
||||
size_t wait_all (std::vector<zmq_poller_event_t> &poller_events,
|
||||
const std::chrono::microseconds timeout)
|
||||
{
|
||||
int rc = zmq_poller_wait_all (poller_ptr.get (), poller_events.data (),
|
||||
static_cast<int> (poller_events.size ()),
|
||||
static_cast<long> (timeout.count ()));
|
||||
if (rc > 0)
|
||||
return rc;
|
||||
return static_cast<size_t> (rc);
|
||||
|
||||
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 2, 3)
|
||||
if (zmq_errno () == EAGAIN)
|
||||
|
||||
Reference in New Issue
Block a user