mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-03-02 20:30:14 +01:00
fixed type mismatch warnings (size_t to int)
MSVC complains about conversion of size_t to int. The size_t typedef is defined as an unsigned __int64 on Win64, which triggers the warning. Two such instances were fixed with static_cast<int>(size_t)
This commit is contained in:
parent
a4459abdd1
commit
0feecde95c
4
zmq.hpp
4
zmq.hpp
@ -131,7 +131,7 @@ namespace zmq
|
|||||||
|
|
||||||
inline int poll(zmq_pollitem_t const* items, size_t nitems)
|
inline int poll(zmq_pollitem_t const* items, size_t nitems)
|
||||||
{
|
{
|
||||||
return poll(items, nitems, -1 );
|
return poll(items, static_cast<int>(nitems), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ZMQ_CPP11
|
#ifdef ZMQ_CPP11
|
||||||
@ -147,7 +147,7 @@ namespace zmq
|
|||||||
|
|
||||||
inline int poll(std::vector<zmq_pollitem_t> const& items, long timeout_ = -1)
|
inline int poll(std::vector<zmq_pollitem_t> const& items, long timeout_ = -1)
|
||||||
{
|
{
|
||||||
return poll(items.data(), items.size(), timeout_);
|
return poll(items.data(), static_cast<int>(items.size()), timeout_);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user