From 5d9a7c92d3eb0a9cb719e6e6386d533da59a51db Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 26 Apr 2018 13:13:32 -0700 Subject: 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. --- host/lib/usrp/b200/b200_impl.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'host/lib/usrp/b200') 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 #include #include -#include #include #include #include @@ -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 time_sources = (_gpsdo_capable) ? - boost::assign::list_of("none")("internal")("external")("gpsdo") : - boost::assign::list_of("none")("internal")("external") ; + const std::vector time_sources = + (_gpsdo_capable) ? + std::vector{"none", "internal", "external", "gpsdo"} : + std::vector{"none", "internal", "external"}; _tree->create >(mb_path / "time_source" / "options") .set(time_sources); _tree->create(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 clock_sources = (_gpsdo_capable) ? - boost::assign::list_of("internal")("external")("gpsdo") : - boost::assign::list_of("internal")("external") ; + const std::vector clock_sources = + (_gpsdo_capable) ? + std::vector{"internal", "external", "gpsdo"} : + std::vector{"internal", "external"}; _tree->create >(mb_path / "clock_source" / "options") .set(clock_sources); _tree->create(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 dirs = boost::assign::list_of(RX_DIRECTION)(TX_DIRECTION); - for(direction_t dir: dirs) { + for (direction_t dir : std::vector{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 ants = boost::assign::list_of("TX/RX")("RX2"); + static const std::vector ants{"TX/RX", "RX2"}; _tree->create >(rf_fe_path / "antenna" / "options").set(ants); _tree->create(rf_fe_path / "antenna" / "value") .add_coerced_subscriber(boost::bind(&b200_impl::update_antenna_sel, this, dspno, _1)) -- cgit v1.2.3