From 0feecde95ceb567dc8bc08ae3448158829e345e3 Mon Sep 17 00:00:00 2001 From: "Christopher D. McMurrough" Date: Thu, 5 Nov 2015 17:21:24 -0600 Subject: [PATCH] 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(size_t) --- zmq.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zmq.hpp b/zmq.hpp index 4f97f48..daacfc5 100644 --- a/zmq.hpp +++ b/zmq.hpp @@ -131,7 +131,7 @@ namespace zmq inline int poll(zmq_pollitem_t const* items, size_t nitems) { - return poll(items, nitems, -1 ); + return poll(items, static_cast(nitems), -1); } #ifdef ZMQ_CPP11 @@ -147,7 +147,7 @@ namespace zmq inline int poll(std::vector const& items, long timeout_ = -1) { - return poll(items.data(), items.size(), timeout_); + return poll(items.data(), static_cast(items.size()), timeout_); } #endif