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/utils/msg.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/utils/msg.cpp')
-rw-r--r-- | host/lib/utils/msg.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/host/lib/utils/msg.cpp b/host/lib/utils/msg.cpp index d9d2fb66a..9a125515d 100644 --- a/host/lib/utils/msg.cpp +++ b/host/lib/utils/msg.cpp @@ -19,7 +19,6 @@ #include <uhd/utils/log.hpp> #include <uhd/utils/static.hpp> #include <boost/thread/mutex.hpp> -#include <boost/foreach.hpp> #include <boost/tokenizer.hpp> #include <sstream> #include <iostream> @@ -35,7 +34,7 @@ static void msg_to_cout(const std::string &msg){ std::stringstream ss; static bool just_had_a_newline = true; - BOOST_FOREACH(char ch, msg){ + for(char ch: msg){ if (just_had_a_newline){ just_had_a_newline = false; ss << "-- "; @@ -53,7 +52,7 @@ static void msg_to_cerr(const std::string &title, const std::string &msg){ std::stringstream ss; ss << std::endl << title << ":" << std::endl; - BOOST_FOREACH(const std::string &line, tokenizer(msg, "\n")){ + for(const std::string &line: tokenizer(msg, "\n")){ ss << " " << line << std::endl; } |