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/lib/utils/msg.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'host/lib/utils/msg.cpp') 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 #include #include -#include #include #include #include @@ -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; } -- cgit v1.2.3