From 805d4a0cff00fb4e0071bb300436bb7eefb8fb16 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 12 Aug 2010 10:08:17 -0700 Subject: uhd: made split string utility function --- host/lib/utils/warning.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'host/lib/utils/warning.cpp') diff --git a/host/lib/utils/warning.cpp b/host/lib/utils/warning.cpp index ae4d4c7aa..8a7d35a23 100644 --- a/host/lib/utils/warning.cpp +++ b/host/lib/utils/warning.cpp @@ -16,7 +16,7 @@ // #include -#include +#include #include #include #include @@ -24,13 +24,9 @@ using namespace uhd; void uhd::print_warning(const std::string &msg){ - //extract the message lines - std::vector lines; - boost::split(lines, msg, boost::is_any_of("\n")); - //print the warning message std::cerr << std::endl << "Warning:" << std::endl; - BOOST_FOREACH(const std::string &line, lines){ + BOOST_FOREACH(const std::string &line, std::split_string(msg, "\n")){ std::cerr << " " << line << std::endl; } } -- cgit v1.2.3