Skip to content

Commit 0feecde

Browse files
committed
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)
1 parent a4459ab commit 0feecde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zmq.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ namespace zmq
131131

132132
inline int poll(zmq_pollitem_t const* items, size_t nitems)
133133
{
134-
return poll(items, nitems, -1 );
134+
return poll(items, static_cast<int>(nitems), -1);
135135
}
136136

137137
#ifdef ZMQ_CPP11
@@ -147,7 +147,7 @@ namespace zmq
147147

148148
inline int poll(std::vector<zmq_pollitem_t> const& items, long timeout_ = -1)
149149
{
150-
return poll(items.data(), items.size(), timeout_);
150+
return poll(items.data(), static_cast<int>(items.size()), timeout_);
151151
}
152152
#endif
153153

0 commit comments

Comments
 (0)