diff --git a/examples/C++/asyncsrv.cpp b/examples/C++/asyncsrv.cpp index 42e34e76..614fb392 100644 --- a/examples/C++/asyncsrv.cpp +++ b/examples/C++/asyncsrv.cpp @@ -35,7 +35,7 @@ class client_task { client_socket_.connect("tcp://localhost:5570"); zmq::pollitem_t items[] = { - { static_cast(client_socket_), 0, ZMQ_POLLIN, 0 } }; + { client_socket_, 0, ZMQ_POLLIN, 0 } }; int request_nbr = 0; try { while (true) { diff --git a/examples/C++/lbbroker.cpp b/examples/C++/lbbroker.cpp index 89f978e1..b2758e01 100644 --- a/examples/C++/lbbroker.cpp +++ b/examples/C++/lbbroker.cpp @@ -105,10 +105,10 @@ int main(int argc, char *argv[]) // Initialize poll set zmq::pollitem_t items[] = { - // Always poll for worker activity on backend - { static_cast(backend), 0, ZMQ_POLLIN, 0 }, + // Always poll for worker activity on backend + { backend, 0, ZMQ_POLLIN, 0 }, // Poll front-end only if we have available workers - { static_cast(frontend), 0, ZMQ_POLLIN, 0 } + { frontend, 0, ZMQ_POLLIN, 0 } }; if (worker_queue.size()) zmq::poll(&items[0], 2, -1); diff --git a/examples/C++/lpclient.cpp b/examples/C++/lpclient.cpp index a3f86ef9..e6241eb7 100644 --- a/examples/C++/lpclient.cpp +++ b/examples/C++/lpclient.cpp @@ -42,7 +42,7 @@ int main () { while (expect_reply) { // Poll socket for a reply, with timeout zmq::pollitem_t items[] = { - { static_cast(*client), 0, ZMQ_POLLIN, 0 } }; + { *client, 0, ZMQ_POLLIN, 0 } }; zmq::poll (&items[0], 1, REQUEST_TIMEOUT); // If we got a reply, process it diff --git a/examples/C++/mdbroker.cpp b/examples/C++/mdbroker.cpp index 01559caf..5294d39c 100644 --- a/examples/C++/mdbroker.cpp +++ b/examples/C++/mdbroker.cpp @@ -392,7 +392,7 @@ class broker { int64_t heartbeat_at = now + HEARTBEAT_INTERVAL; while (!s_interrupted) { zmq::pollitem_t items [] = { - { static_cast(*m_socket), 0, ZMQ_POLLIN, 0} }; + { *m_socket, 0, ZMQ_POLLIN, 0} }; int64_t timeout = heartbeat_at - now; if (timeout < 0) timeout = 0; diff --git a/examples/C++/mdcliapi.hpp b/examples/C++/mdcliapi.hpp index c542ece5..284e9b89 100644 --- a/examples/C++/mdcliapi.hpp +++ b/examples/C++/mdcliapi.hpp @@ -107,7 +107,7 @@ class mdcli { while (!s_interrupted) { // Poll socket for a reply, with timeout zmq::pollitem_t items [] = { - { static_cast(*m_client), 0, ZMQ_POLLIN, 0 } }; + { *m_client, 0, ZMQ_POLLIN, 0 } }; zmq::poll (items, 1, m_timeout); // If we got a reply, process it diff --git a/examples/C++/mdcliapi2.hpp b/examples/C++/mdcliapi2.hpp index f840c8cc..6153364f 100644 --- a/examples/C++/mdcliapi2.hpp +++ b/examples/C++/mdcliapi2.hpp @@ -103,7 +103,7 @@ class mdcli { { // Poll socket for a reply, with timeout zmq::pollitem_t items[] = { - { static_cast(*m_client), 0, ZMQ_POLLIN, 0 } }; + { *m_client, 0, ZMQ_POLLIN, 0 } }; zmq::poll (items, 1, m_timeout); // If we got a reply, process it diff --git a/examples/C++/mdwrkapi.hpp b/examples/C++/mdwrkapi.hpp index ee5dd321..c58776ff 100644 --- a/examples/C++/mdwrkapi.hpp +++ b/examples/C++/mdwrkapi.hpp @@ -132,7 +132,7 @@ class mdwrk { while (!s_interrupted) { zmq::pollitem_t items[] = { - { static_cast(*m_worker), 0, ZMQ_POLLIN, 0 } }; + { *m_worker, 0, ZMQ_POLLIN, 0 } }; zmq::poll (items, 1, m_heartbeat); if (items[0].revents & ZMQ_POLLIN) { diff --git a/examples/C++/mspoller.cpp b/examples/C++/mspoller.cpp index 61d0461b..bd1b81bb 100644 --- a/examples/C++/mspoller.cpp +++ b/examples/C++/mspoller.cpp @@ -21,8 +21,8 @@ int main (int argc, char *argv[]) // Initialize poll set zmq::pollitem_t items [] = { - { static_cast(receiver), 0, ZMQ_POLLIN, 0 }, - { static_cast(subscriber), 0, ZMQ_POLLIN, 0 } + { receiver, 0, ZMQ_POLLIN, 0 }, + { subscriber, 0, ZMQ_POLLIN, 0 } }; // Process messages from both sockets while (1) { diff --git a/examples/C++/ppqueue.cpp b/examples/C++/ppqueue.cpp index e5118ded..fae21a0f 100644 --- a/examples/C++/ppqueue.cpp +++ b/examples/C++/ppqueue.cpp @@ -110,8 +110,8 @@ int main (void) while (1) { zmq::pollitem_t items [] = { - { static_cast(backend), 0, ZMQ_POLLIN, 0 }, - { static_cast(frontend), 0, ZMQ_POLLIN, 0 } + { backend, 0, ZMQ_POLLIN, 0 }, + { frontend, 0, ZMQ_POLLIN, 0 } }; // Poll frontend only if we have available workers if (queue.size()) { diff --git a/examples/C++/rrbroker.cpp b/examples/C++/rrbroker.cpp index 5307d4f8..1527cc07 100644 --- a/examples/C++/rrbroker.cpp +++ b/examples/C++/rrbroker.cpp @@ -17,8 +17,8 @@ int main (int argc, char *argv[]) // Initialize poll set zmq::pollitem_t items [] = { - { static_cast(frontend), 0, ZMQ_POLLIN, 0 }, - { static_cast(backend), 0, ZMQ_POLLIN, 0 } + { frontend, 0, ZMQ_POLLIN, 0 }, + { backend, 0, ZMQ_POLLIN, 0 } }; // Switch messages between sockets diff --git a/examples/C++/spqueue.cpp b/examples/C++/spqueue.cpp index f19b2f18..94b7e869 100644 --- a/examples/C++/spqueue.cpp +++ b/examples/C++/spqueue.cpp @@ -25,8 +25,8 @@ int main (void) while (1) { zmq::pollitem_t items [] = { - { static_cast(backend), 0, ZMQ_POLLIN, 0 }, - { static_cast(frontend), 0, ZMQ_POLLIN, 0 } + { backend, 0, ZMQ_POLLIN, 0 }, + { frontend, 0, ZMQ_POLLIN, 0 } }; // Poll frontend only if we have available workers if (worker_queue.size()) diff --git a/examples/C++/taskwork2.cpp b/examples/C++/taskwork2.cpp index 94c5487c..f1ccbef8 100644 --- a/examples/C++/taskwork2.cpp +++ b/examples/C++/taskwork2.cpp @@ -25,8 +25,8 @@ int main (int argc, char *argv[]) // Process messages from receiver and controller zmq::pollitem_t items [] = { - { static_cast(receiver), 0, ZMQ_POLLIN, 0 }, - { static_cast(controller), 0, ZMQ_POLLIN, 0 } + { receiver, 0, ZMQ_POLLIN, 0 }, + { controller, 0, ZMQ_POLLIN, 0 } }; // Process messages from both sockets while (1) { diff --git a/examples/C++/tripping.cpp b/examples/C++/tripping.cpp index 123ba90a..58c7b14b 100644 --- a/examples/C++/tripping.cpp +++ b/examples/C++/tripping.cpp @@ -73,8 +73,8 @@ broker_task (void *args) // Initialize poll set zmq::pollitem_t items [] = { - { static_cast(frontend), 0, ZMQ_POLLIN, 0 }, - { static_cast(backend), 0, ZMQ_POLLIN, 0 } + { frontend, 0, ZMQ_POLLIN, 0 }, + { backend, 0, ZMQ_POLLIN, 0 } }; while (1) { zmq::poll (items, 2, -1);