aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples/test_messages.cpp
diff options
context:
space:
mode:
authorAndrej Rode <andrej.rode@ettus.com>2017-02-09 23:19:55 -0800
committerMartin Braun <martin.braun@ettus.com>2017-02-10 16:44:33 -0800
commit26cc20847cde543e759aa5cee9a27eaa69c5dd9e (patch)
treeeee102333381e2313af59e725d6b7a06b665161f /host/examples/test_messages.cpp
parentf3a004faf7d50cbb5564f5e2f67f54ee07e051dd (diff)
downloaduhd-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/examples/test_messages.cpp')
-rw-r--r--host/examples/test_messages.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/host/examples/test_messages.cpp b/host/examples/test_messages.cpp
index 4135bca56..2583811ba 100644
--- a/host/examples/test_messages.cpp
+++ b/host/examples/test_messages.cpp
@@ -23,7 +23,6 @@
#include <uhd/usrp/multi_usrp.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/program_options.hpp>
-#include <boost/foreach.hpp>
#include <boost/bind.hpp>
#include <boost/format.hpp>
#include <cstdlib>
@@ -330,7 +329,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
//init result counts
uhd::dict<std::string, size_t> failures, successes;
- BOOST_FOREACH(const std::string &key, tests.keys()){
+ for(const std::string &key: tests.keys()){
failures[key] = 0;
successes[key] = 0;
}
@@ -352,7 +351,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
//print the result summary
bool any_failure = false;
std::cout << std::endl << "Summary:" << std::endl << std::endl;
- BOOST_FOREACH(const std::string &key, tests.keys()){
+ for(const std::string &key: tests.keys()){
std::cout << boost::format(
"%s -> %3u successes, %3u failures"
) % key % successes[key] % failures[key] << std::endl;