From 26cc20847cde543e759aa5cee9a27eaa69c5dd9e Mon Sep 17 00:00:00 2001 From: Andrej Rode Date: Thu, 9 Feb 2017 23:19:55 -0800 Subject: 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. --- host/utils/converter_benchmark.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'host/utils/converter_benchmark.cpp') diff --git a/host/utils/converter_benchmark.cpp b/host/utils/converter_benchmark.cpp index f6d7e9650..ba4819f49 100644 --- a/host/utils/converter_benchmark.cpp +++ b/host/utils/converter_benchmark.cpp @@ -354,7 +354,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) boost::is_any_of(","), // Split at , boost::token_compress_on // Avoid empty results ); - BOOST_FOREACH(const std::string &this_prio, prios_in_list) { + for(const std::string &this_prio: prios_in_list) { size_t prio_index = boost::lexical_cast(this_prio); converter::sptr conv_for_prio = get_converter(converter_id, prio_index)(); // Can throw a uhd::key_error conv_list[prio_index] = conv_for_prio; @@ -384,7 +384,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) /// Final configurations to the converter: std::cout << "Configuring converters:" << std::endl; - BOOST_FOREACH(priority_type prio_i, conv_list.keys()) { + for(priority_type prio_i: conv_list.keys()) { std::cout << "* [" << prio_i << "]: "; configure_conv(conv_list[prio_i], in_type, out_type); } @@ -393,7 +393,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) std::cout << "{{{" << std::endl; if (not debug_mode) { std::cout << "prio,duration_ms,avg_duration_ms,n_samples,iterations" << std::endl; - BOOST_FOREACH(priority_type prio_i, conv_list.keys()) { + for(priority_type prio_i: conv_list.keys()) { double duration = run_benchmark( conv_list[prio_i], input_buf_refs, -- cgit v1.2.3