From a72e29ca1de5b484bedcb1cfa8be6cd2216dc54e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 9 Feb 2011 19:23:36 -0800 Subject: uhd: tweaks for windows warnings and errors --- host/lib/transport/udp_zero_copy_asio.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'host/lib/transport') diff --git a/host/lib/transport/udp_zero_copy_asio.cpp b/host/lib/transport/udp_zero_copy_asio.cpp index 33c7dd94e..48b0941eb 100644 --- a/host/lib/transport/udp_zero_copy_asio.cpp +++ b/host/lib/transport/udp_zero_copy_asio.cpp @@ -58,7 +58,7 @@ public: return sptr(this, &udp_zero_copy_asio_mrb::fake_deleter); } - void *get(void) const{return _mem;} + template T cast(void) const{return static_cast(_mem);} private: static void fake_deleter(void *obj){ @@ -210,7 +210,7 @@ public: ::select(_sock_fd+1, &rset, NULL, NULL, &tv) > 0 and _pending_recv_buffs.pop_with_haste(mrb) ){ - return mrb->get_new(::recv(_sock_fd, mrb->get(), _recv_frame_size, 0)); + return mrb->get_new(::recv(_sock_fd, mrb->cast(), _recv_frame_size, 0)); } return managed_recv_buffer::sptr(); } @@ -235,7 +235,7 @@ public: } void commit(udp_zero_copy_asio_msb *msb, size_t len){ - ::send(_sock_fd, msb->cast(), len, 0); + ::send(_sock_fd, msb->cast(), len, 0); handle_send(msb); } -- cgit v1.2.3