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/utils/converter_benchmark.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/utils/converter_benchmark.cpp')
-rw-r--r-- | host/utils/converter_benchmark.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<size_t>(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, |