From fcc2e9c602a6103dfd0f75e035f614b177c5dc35 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 28 Sep 2019 12:54:27 +0200 Subject: uhd: Replace boost::function with std::function This is mostly a search-and-replace operation, with few exceptions: - boost::function has a clear() method. In C++11, this is achieved by assigning nullptr to the std::function object. - The empty() method is replaced by std::function's bool() operator --- host/lib/transport/libusb1_zero_copy.cpp | 6 +++--- host/lib/transport/super_recv_packet_handler.hpp | 12 ++++++------ host/lib/transport/super_send_packet_handler.hpp | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'host/lib/transport') diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp index fbeddbcdd..356d247cb 100644 --- a/host/lib/transport/libusb1_zero_copy.cpp +++ b/host/lib/transport/libusb1_zero_copy.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -115,7 +115,7 @@ class libusb_zero_copy_mb : public managed_buffer public: libusb_zero_copy_mb(libusb_transfer* lut, const size_t frame_size, - boost::function release_cb, + std::function release_cb, const bool is_recv, const std::string& name) : _release_cb(release_cb) @@ -192,7 +192,7 @@ public: } private: - boost::function _release_cb; + std::function _release_cb; const bool _is_recv; const std::string _name; libusb_context* _ctx; diff --git a/host/lib/transport/super_recv_packet_handler.hpp b/host/lib/transport/super_recv_packet_handler.hpp index a09281459..b19b50b38 100644 --- a/host/lib/transport/super_recv_packet_handler.hpp +++ b/host/lib/transport/super_recv_packet_handler.hpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -36,7 +36,7 @@ UHD_INLINE uint32_t get_context_code( return word0 & 0xff; } -typedef boost::function handle_overflow_type; +typedef std::function handle_overflow_type; static inline void handle_overflow_nop(void) {} /*********************************************************************** @@ -49,12 +49,12 @@ static inline void handle_overflow_nop(void) {} class recv_packet_handler { public: - typedef boost::function get_buff_type; - typedef boost::function handle_flowctrl_type; + typedef std::function get_buff_type; + typedef std::function handle_flowctrl_type; typedef std::function handle_flowctrl_ack_type; - typedef boost::function issue_stream_cmd_type; + typedef std::function issue_stream_cmd_type; typedef void (*vrt_unpacker_type)(const uint32_t*, vrt::if_packet_info_t&); - // typedef boost::function + // typedef std::function // vrt_unpacker_type; /*! diff --git a/host/lib/transport/super_send_packet_handler.hpp b/host/lib/transport/super_send_packet_handler.hpp index 40ca2e414..21f7357c3 100644 --- a/host/lib/transport/super_send_packet_handler.hpp +++ b/host/lib/transport/super_send_packet_handler.hpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.3