summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2020-03-22 14:55:14 +0000
committerMartin Braun <martin@gnuradio.org>2020-03-27 08:45:52 -0700
commit5a9f864c9befdee426da6ddaec6e96c63e571bc3 (patch)
treee1529ddef962be3843eefb94d8619b79a79c8aca /gnuradio-runtime/lib
parent414a495d639ffb817dd3c04d771719e938f50daf (diff)
Replace BOOST_FOREACH with C++11 range for
Diffstat (limited to 'gnuradio-runtime/lib')
-rw-r--r--gnuradio-runtime/lib/prefs.cc5
-rw-r--r--gnuradio-runtime/lib/tpb_thread_body.cc3
2 files changed, 3 insertions, 5 deletions
diff --git a/gnuradio-runtime/lib/prefs.cc b/gnuradio-runtime/lib/prefs.cc
index 6eefcfd569..f87bb7a10c 100644
--- a/gnuradio-runtime/lib/prefs.cc
+++ b/gnuradio-runtime/lib/prefs.cc
@@ -23,7 +23,6 @@
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
-#include <boost/foreach.hpp>
#include <boost/program_options.hpp>
namespace fs = boost::filesystem;
namespace po = boost::program_options;
@@ -73,13 +72,13 @@ std::vector<std::string> prefs::_sys_prefs_filenames()
void prefs::_read_files(const std::vector<std::string>& filenames)
{
- BOOST_FOREACH (std::string fname, filenames) {
+ for (const auto& fname : filenames) {
std::ifstream infile(fname.c_str());
if (infile.good()) {
try {
po::basic_parsed_options<char_t> parsed =
po::parse_config_file(infile, po::options_description(), true);
- BOOST_FOREACH (po::basic_option<char_t> o, (parsed.options)) {
+ for (const auto& o : parsed.options) {
std::string okey = o.string_key;
size_t pos = okey.find(".");
std::string section, key;
diff --git a/gnuradio-runtime/lib/tpb_thread_body.cc b/gnuradio-runtime/lib/tpb_thread_body.cc
index d262427b35..fd5b278cb9 100644
--- a/gnuradio-runtime/lib/tpb_thread_body.cc
+++ b/gnuradio-runtime/lib/tpb_thread_body.cc
@@ -15,7 +15,6 @@
#include "tpb_thread_body.h"
#include <gnuradio/prefs.h>
#include <pmt/pmt.h>
-#include <boost/foreach.hpp>
#include <boost/thread.hpp>
#include <iostream>
@@ -87,7 +86,7 @@ tpb_thread_body::tpb_thread_body(block_sptr block,
d->d_tpb.clear_changed();
// handle any queued up messages
- BOOST_FOREACH (basic_block::msg_queue_map_t::value_type& i, block->msg_queue) {
+ for (const auto& i : block->msg_queue) {
// Check if we have a message handler attached before getting
// any messages. This is mostly a protection for the unknown
// startup sequence of the threads.