Merge pull request #101 from JohanMabille/warning_fix

Fixed warnings in c++11 poll functions
This commit is contained in:
Luca Boccassi 2016-12-09 14:04:25 +01:00 committed by GitHub
commit 229e7a849b

View File

@ -155,12 +155,12 @@ namespace zmq
#ifdef ZMQ_CPP11
inline int poll(zmq_pollitem_t const* items, size_t nitems, std::chrono::milliseconds timeout)
{
return poll(items, nitems, timeout.count() );
return poll(items, nitems, static_cast<long>(timeout.count()));
}
inline int poll(std::vector<zmq_pollitem_t> const& items, std::chrono::milliseconds timeout)
{
return poll(items.data(), items.size(), timeout.count() );
return poll(items.data(), items.size(), static_cast<long>(timeout.count()));
}
inline int poll(std::vector<zmq_pollitem_t> const& items, long timeout_ = -1)