aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-09-28 12:54:27 +0200
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:32 -0800
commitfcc2e9c602a6103dfd0f75e035f614b177c5dc35 (patch)
tree8c6162ab134a79f343b8404f1d82b6bd9483d116 /host/lib/usrp/usrp1
parent0c43030e71f4786bf1ba1b7f08abf6b3d019761f (diff)
downloaduhd-fcc2e9c602a6103dfd0f75e035f614b177c5dc35.tar.gz
uhd-fcc2e9c602a6103dfd0f75e035f614b177c5dc35.tar.bz2
uhd-fcc2e9c602a6103dfd0f75e035f614b177c5dc35.zip
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
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp8
-rw-r--r--host/lib/usrp/usrp1/soft_time_ctrl.hpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index 3d45824e4..462f330e6 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -76,7 +76,7 @@ struct offset_send_buffer{
**********************************************************************/
class offset_managed_send_buffer : public managed_send_buffer{
public:
- typedef boost::function<void(offset_send_buffer&, offset_send_buffer&, size_t)> commit_cb_type;
+ typedef std::function<void(offset_send_buffer&, offset_send_buffer&, size_t)> commit_cb_type;
offset_managed_send_buffer(const commit_cb_type &commit_cb):
_commit_cb(commit_cb)
{
@@ -366,7 +366,7 @@ private:
**********************************************************************/
class usrp1_send_packet_streamer : public sph::send_packet_handler, public tx_streamer{
public:
- usrp1_send_packet_streamer(const size_t max_num_samps, soft_time_ctrl::sptr stc, boost::function<void(bool)> tx_enb_fcn){
+ usrp1_send_packet_streamer(const size_t max_num_samps, soft_time_ctrl::sptr stc, std::function<void(bool)> tx_enb_fcn){
_max_num_samps = max_num_samps;
this->set_max_samples_per_packet(_max_num_samps);
_stc = stc;
@@ -419,7 +419,7 @@ public:
private:
size_t _max_num_samps;
soft_time_ctrl::sptr _stc;
- boost::function<void(bool)> _tx_enb_fcn;
+ std::function<void(bool)> _tx_enb_fcn;
};
/***********************************************************************
@@ -687,7 +687,7 @@ tx_streamer::sptr usrp1_impl::get_tx_stream(const uhd::stream_args_t &args_){
const size_t spp = bpp/convert::get_bytes_per_item(args.otw_format);
//make the new streamer given the samples per packet
- boost::function<void(bool)> tx_fcn = boost::bind(&usrp1_impl::tx_stream_on_off, this, _1);
+ std::function<void(bool)> tx_fcn = boost::bind(&usrp1_impl::tx_stream_on_off, this, _1);
std::shared_ptr<usrp1_send_packet_streamer> my_streamer =
std::make_shared<usrp1_send_packet_streamer>(spp, _soft_time_ctrl, tx_fcn);
diff --git a/host/lib/usrp/usrp1/soft_time_ctrl.hpp b/host/lib/usrp/usrp1/soft_time_ctrl.hpp
index 9143b6af2..48915499a 100644
--- a/host/lib/usrp/usrp1/soft_time_ctrl.hpp
+++ b/host/lib/usrp/usrp1/soft_time_ctrl.hpp
@@ -14,7 +14,7 @@
#include <uhd/transport/bounded_buffer.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <memory>
-#include <boost/function.hpp>
+#include <functional>
namespace uhd{ namespace usrp{
@@ -28,7 +28,7 @@ namespace uhd{ namespace usrp{
class soft_time_ctrl : uhd::noncopyable{
public:
typedef std::shared_ptr<soft_time_ctrl> sptr;
- typedef boost::function<void(bool)> cb_fcn_type;
+ typedef std::function<void(bool)> cb_fcn_type;
virtual ~soft_time_ctrl(void) = 0;