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 | |
| parent | fb7e8a09a58f4c08f70ba0e088710a0e011ea01d (diff) | |
| download | uhd-a72e29ca1de5b484bedcb1cfa8be6cd2216dc54e.tar.gz uhd-a72e29ca1de5b484bedcb1cfa8be6cd2216dc54e.tar.bz2 uhd-a72e29ca1de5b484bedcb1cfa8be6cd2216dc54e.zip | |
uhd: tweaks for windows warnings and errors
| -rw-r--r-- | host/include/uhd/transport/bounded_buffer.ipp | 7 | ||||
| -rw-r--r-- | host/lib/transport/udp_zero_copy_asio.cpp | 6 | 
2 files changed, 6 insertions, 7 deletions
| diff --git a/host/include/uhd/transport/bounded_buffer.ipp b/host/include/uhd/transport/bounded_buffer.ipp index 466c7a306..7be2f987c 100644 --- a/host/include/uhd/transport/bounded_buffer.ipp +++ b/host/include/uhd/transport/bounded_buffer.ipp @@ -31,11 +31,10 @@ namespace uhd{ namespace transport{ namespace{ /*anon*/      public:          bounded_buffer_detail(size_t capacity): -            _buffer(capacity), -            _not_full_fcn(boost::bind(&bounded_buffer_detail<elem_type>::not_full, this)), -            _not_empty_fcn(boost::bind(&bounded_buffer_detail<elem_type>::not_empty, this)) +            _buffer(capacity)          { -            /* NOP */ +            _not_full_fcn  = boost::bind(&bounded_buffer_detail<elem_type>::not_full, this); +            _not_empty_fcn = boost::bind(&bounded_buffer_detail<elem_type>::not_empty, this);          }          UHD_INLINE bool push_with_pop_on_full(const elem_type &elem){ 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);      } | 
