diff options
author | Andrej Rode <andrej.rode@ettus.com> | 2017-02-09 23:19:55 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-02-10 16:44:33 -0800 |
commit | 26cc20847cde543e759aa5cee9a27eaa69c5dd9e (patch) | |
tree | eee102333381e2313af59e725d6b7a06b665161f /host/lib/usrp/b200/b200_io_impl.cpp | |
parent | f3a004faf7d50cbb5564f5e2f67f54ee07e051dd (diff) | |
download | uhd-26cc20847cde543e759aa5cee9a27eaa69c5dd9e.tar.gz uhd-26cc20847cde543e759aa5cee9a27eaa69c5dd9e.tar.bz2 uhd-26cc20847cde543e759aa5cee9a27eaa69c5dd9e.zip |
uhd: replace BOOST_FOREACH with C++11 range-based for loop
Note: This is the first commit that uses for-range, and range-based
for-loops are now usable for UHD development.
Diffstat (limited to 'host/lib/usrp/b200/b200_io_impl.cpp')
-rw-r--r-- | host/lib/usrp/b200/b200_io_impl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp index 0a00b9402..09aaff7ed 100644 --- a/host/lib/usrp/b200/b200_io_impl.cpp +++ b/host/lib/usrp/b200/b200_io_impl.cpp @@ -45,7 +45,7 @@ void b200_impl::check_tick_rate_with_current_streamers(double rate) size_t b200_impl::max_chan_count(const std::string &direction /* = "" */) { size_t max_count = 0; - BOOST_FOREACH(radio_perifs_t &perif, _radio_perifs) + for(radio_perifs_t &perif: _radio_perifs) { if ((direction == "RX" or direction.empty()) and not perif.rx_streamer.expired()) { boost::shared_ptr<sph::recv_packet_streamer> rx_streamer = @@ -97,7 +97,7 @@ void b200_impl::set_auto_tick_rate( for (int i = 0; i < 2; i++) { // Loop through rx and tx std::string dir = (i == 0) ? "tx" : "rx"; // We assume all 'set' DSPs are being used. - BOOST_FOREACH(const std::string &dsp_no, _tree->list(str(boost::format("/mboards/0/%s_dsps") % dir))) { + for(const std::string &dsp_no: _tree->list(str(boost::format("/mboards/0/%s_dsps") % dir))) { fs_path dsp_path = str(boost::format("/mboards/0/%s_dsps/%s") % dir % dsp_no); if (dsp_path == tree_dsp_path) { continue; @@ -146,14 +146,14 @@ void b200_impl::update_tick_rate(const double new_tick_rate) { check_tick_rate_with_current_streamers(new_tick_rate); - BOOST_FOREACH(radio_perifs_t &perif, _radio_perifs) + for(radio_perifs_t &perif: _radio_perifs) { boost::shared_ptr<sph::recv_packet_streamer> my_streamer = boost::dynamic_pointer_cast<sph::recv_packet_streamer>(perif.rx_streamer.lock()); if (my_streamer) my_streamer->set_tick_rate(new_tick_rate); perif.framer->set_tick_rate(new_tick_rate); } - BOOST_FOREACH(radio_perifs_t &perif, _radio_perifs) + for(radio_perifs_t &perif: _radio_perifs) { boost::shared_ptr<sph::send_packet_streamer> my_streamer = boost::dynamic_pointer_cast<sph::send_packet_streamer>(perif.tx_streamer.lock()); |