diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-08-09 16:54:12 -0500 |
---|---|---|
committer | Brent Stapleton <bstapleton@g.hmc.edu> | 2018-08-16 11:40:48 -0700 |
commit | c14944c357c2d548632472d06e101ca95a7a12b6 (patch) | |
tree | 5d163d0b45c7b6b1d367b79bce547c01a711a3b2 /host/lib/usrp | |
parent | e3dea51248c90772167a83defd95446bd84ef5ba (diff) | |
download | uhd-c14944c357c2d548632472d06e101ca95a7a12b6.tar.gz uhd-c14944c357c2d548632472d06e101ca95a7a12b6.tar.bz2 uhd-c14944c357c2d548632472d06e101ca95a7a12b6.zip |
b200: Remove superfluous fake lambda
No functional changes. Cleanup only. A little less Boost.
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 239bd97b1..a173c68f8 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -795,15 +795,6 @@ b200_impl::~b200_impl(void) /*********************************************************************** * setup radio control objects **********************************************************************/ - -void lambda_set_bool_prop(boost::weak_ptr<property_tree> tree_wptr, fs_path path, bool value, double) -{ - property_tree::sptr tree = tree_wptr.lock(); - if (tree) { - tree->access<bool>(path).set(value); - } -} - void b200_impl::setup_radio(const size_t dspno) { radio_perifs_t &perif = _radio_perifs[dspno]; @@ -862,7 +853,11 @@ void b200_impl::setup_radio(const size_t dspno) _tree->create<bool>(rx_dsp_path / "rate" / "set").set(false); _tree->access<double>(rx_dsp_path / "rate" / "value") .set_coercer(boost::bind(&b200_impl::coerce_rx_samp_rate, this, perif.ddc, dspno, _1)) - .add_coerced_subscriber(boost::bind(&lambda_set_bool_prop, boost::weak_ptr<property_tree>(_tree), rx_dsp_path / "rate" / "set", true, _1)) + .add_coerced_subscriber([this](const double){ + if (this->_tree) { + _tree->access<bool>(rx_dsp_path / "rate" / "set").set(true); + } + }) .add_coerced_subscriber(boost::bind(&b200_impl::update_rx_samp_rate, this, dspno, _1)) ; _tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd") @@ -880,7 +875,11 @@ void b200_impl::setup_radio(const size_t dspno) _tree->create<bool>(tx_dsp_path / "rate" / "set").set(false); _tree->access<double>(tx_dsp_path / "rate" / "value") .set_coercer(boost::bind(&b200_impl::coerce_tx_samp_rate, this, perif.duc, dspno, _1)) - .add_coerced_subscriber(boost::bind(&lambda_set_bool_prop, boost::weak_ptr<property_tree>(_tree), tx_dsp_path / "rate" / "set", true, _1)) + .add_coerced_subscriber([this](const double){ + if (this->_tree) { + tree->access<bool>(tx_dsp_path / "rate" / "set").set(true); + } + }) .add_coerced_subscriber(boost::bind(&b200_impl::update_tx_samp_rate, this, dspno, _1)) ; _tree->access<double>(mb_path / "tick_rate") |