aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-10-11 17:00:22 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:04:02 -0800
commite10314e400df2e5310ce5333f88d2636ded2348b (patch)
tree1c9f346f0236cfd3f72a98775b875367d51ae50a /host
parentd7df61852426490fd051bc2f23d5e360d19e6417 (diff)
downloaduhd-e10314e400df2e5310ce5333f88d2636ded2348b.tar.gz
uhd-e10314e400df2e5310ce5333f88d2636ded2348b.tar.bz2
uhd-e10314e400df2e5310ce5333f88d2636ded2348b.zip
mg: Fix lambda-related warnings in block control
We're not using C++14 yet, so named captures are not yet available.
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
index 53d1f7dab..7b6b83339 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
@@ -152,13 +152,14 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(magnesium_radio_ctrl)
{
// TODO: fix antenna name
// Now witness the firepower of this fully armed and operational lambda
- auto coerced_lambda = [this, chan, dir = dir[fe_idx]](const std::string &ant)
+ auto dir_ = dir[fe_idx];
+ auto coerced_lambda = [this, chan, dir_](const std::string &ant)
{
- return this->_set_antenna(ant, chan, dir);
+ return this->_set_antenna(ant, chan, dir_);
};
- auto publisher_lambda = [this, chan, dir = dir[fe_idx]]()
+ auto publisher_lambda = [this, chan, dir_]()
{
- return this->_get_antenna(chan, dir);
+ return this->_get_antenna(chan, dir_);
};
_tree->create<std::string>(fe_path / "antenna" / "value")
.set(str(boost::format("%s%d") % ant[fe_idx] % (chan + 1)))
@@ -169,13 +170,14 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(magnesium_radio_ctrl)
.set(std::vector<std::string>(1, str(boost::format("%s%d") % ant[fe_idx] % (chan + 1))));
}
{
- auto coerced_lambda = [this, chan, dir = dir[fe_idx]](const double freq)
+ auto dir_ = dir[fe_idx];
+ auto coerced_lambda = [this, chan, dir_](const double freq)
{
- return this->_set_frequency(freq, chan, dir);
+ return this->_set_frequency(freq, chan, dir_);
};
- auto publisher_lambda = [this, chan, dir = dir[fe_idx]]()
+ auto publisher_lambda = [this, chan, dir_]()
{
- return this->_get_frequency(chan, dir);
+ return this->_get_frequency(chan, dir_);
};
_tree->create<double>(fe_path / "freq" / "value")
.set(MAGNESIUM_CENTER_FREQ)
@@ -185,13 +187,14 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(magnesium_radio_ctrl)
.set(meta_range_t(MAGNESIUM_MIN_FREQ, MAGNESIUM_MAX_FREQ));
}
{
- auto coerced_lambda = [this, chan, dir = dir[fe_idx]](const double gain)
+ auto dir_ = dir[fe_idx];
+ auto coerced_lambda = [this, chan, dir_](const double gain)
{
- return this->_set_gain(gain, chan, dir);
+ return this->_set_gain(gain, chan, dir_);
};
- auto publisher_lambda = [this, chan, dir = dir[fe_idx]]()
+ auto publisher_lambda = [this, chan, dir_]()
{
- return this->_get_gain(chan, dir);
+ return this->_get_gain(chan, dir_);
};
auto min_gain = (fe_idx == RX_IDX) ? MAGNESIUM_MIN_RX_GAIN : MAGNESIUM_MIN_TX_GAIN;
auto max_gain = (fe_idx == RX_IDX) ? MAGNESIUM_MAX_RX_GAIN : MAGNESIUM_MAX_TX_GAIN;