diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-04-26 13:13:32 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-05-02 17:01:21 -0700 |
commit | 5d9a7c92d3eb0a9cb719e6e6386d533da59a51db (patch) | |
tree | 024bda2ede2231784b55c48e1a23ab39fd97182d /host/lib/usrp/b200 | |
parent | c52c0b69fc151c7596f9754e6b1e40dede531134 (diff) | |
download | uhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.tar.gz uhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.tar.bz2 uhd-5d9a7c92d3eb0a9cb719e6e6386d533da59a51db.zip |
lib: Purge use of boost::assign, except for uhd::dict
Replaced with initialization lists.
Note: uhd::dict does not work with initializer lists without making
changes to said data structure. This commit has no functional changes,
so keeping the boost::assigns for uhd::dict.
Diffstat (limited to 'host/lib/usrp/b200')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index fe3b21aee..56b05a9ae 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -17,7 +17,6 @@ #include <uhd/utils/safe_call.hpp> #include <uhd/usrp/dboard_eeprom.hpp> #include <boost/format.hpp> -#include <boost/assign/list_of.hpp> #include <boost/filesystem.hpp> #include <boost/thread/thread.hpp> #include <boost/lexical_cast.hpp> @@ -643,18 +642,20 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s } //setup time source props - static const std::vector<std::string> time_sources = (_gpsdo_capable) ? - boost::assign::list_of("none")("internal")("external")("gpsdo") : - boost::assign::list_of("none")("internal")("external") ; + const std::vector<std::string> time_sources = + (_gpsdo_capable) ? + std::vector<std::string>{"none", "internal", "external", "gpsdo"} : + std::vector<std::string>{"none", "internal", "external"}; _tree->create<std::vector<std::string> >(mb_path / "time_source" / "options") .set(time_sources); _tree->create<std::string>(mb_path / "time_source" / "value") .set_coercer(boost::bind(&check_option_valid, "time source", time_sources, _1)) .add_coerced_subscriber(boost::bind(&b200_impl::update_time_source, this, _1)); //setup reference source props - static const std::vector<std::string> clock_sources = (_gpsdo_capable) ? - boost::assign::list_of("internal")("external")("gpsdo") : - boost::assign::list_of("internal")("external") ; + const std::vector<std::string> clock_sources = + (_gpsdo_capable) ? + std::vector<std::string>{"internal", "external", "gpsdo"} : + std::vector<std::string>{"internal", "external"}; _tree->create<std::vector<std::string> >(mb_path / "clock_source" / "options") .set(clock_sources); _tree->create<std::string>(mb_path / "clock_source" / "value") @@ -847,8 +848,7 @@ void b200_impl::setup_radio(const size_t dspno) //////////////////////////////////////////////////////////////////// // create RF frontend interfacing //////////////////////////////////////////////////////////////////// - static const std::vector<direction_t> dirs = boost::assign::list_of(RX_DIRECTION)(TX_DIRECTION); - for(direction_t dir: dirs) { + for (direction_t dir : std::vector<direction_t>{RX_DIRECTION, TX_DIRECTION}) { const std::string x = (dir == RX_DIRECTION) ? "rx" : "tx"; const std::string key = std::string(((dir == RX_DIRECTION) ? "RX" : "TX")) + std::string(((dspno == _fe1) ? "1" : "2")); const fs_path rf_fe_path @@ -868,7 +868,7 @@ void b200_impl::setup_radio(const size_t dspno) ; if (dir == RX_DIRECTION) { - static const std::vector<std::string> ants = boost::assign::list_of("TX/RX")("RX2"); + static const std::vector<std::string> ants{"TX/RX", "RX2"}; _tree->create<std::vector<std::string> >(rf_fe_path / "antenna" / "options").set(ants); _tree->create<std::string>(rf_fe_path / "antenna" / "value") .add_coerced_subscriber(boost::bind(&b200_impl::update_antenna_sel, this, dspno, _1)) |