diff options
author | Josh Blum <josh@joshknows.com> | 2011-02-09 19:23:36 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-02-09 19:23:36 -0800 |
commit | a72e29ca1de5b484bedcb1cfa8be6cd2216dc54e (patch) | |
tree | e5fb8caf9ad71372bef098db189be445ef5d835a /host/lib/transport | |
parent | fb7e8a09a58f4c08f70ba0e088710a0e011ea01d (diff) | |
download | uhd-a72e29ca1de5b484bedcb1cfa8be6cd2216dc54e.tar.gz uhd-a72e29ca1de5b484bedcb1cfa8be6cd2216dc54e.tar.bz2 uhd-a72e29ca1de5b484bedcb1cfa8be6cd2216dc54e.zip |
uhd: tweaks for windows warnings and errors
Diffstat (limited to 'host/lib/transport')
-rw-r--r-- | host/lib/transport/udp_zero_copy_asio.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 <class T> T cast(void) const{return static_cast<T>(_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<char *>(), _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<const void *>(), len, 0); + ::send(_sock_fd, msb->cast<const char *>(), len, 0); handle_send(msb); } |