diff options
author | Josh Blum <josh@joshknows.com> | 2010-08-12 18:17:48 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-08-12 18:17:48 +0000 |
commit | a1d768d540d4f78ddf634033892459a5f1d3847f (patch) | |
tree | 66b60a3031b13fa23389b6ce2cf090098d232316 /host/lib/utils/paths.cpp | |
parent | 68a65581db6455bfd4652576eeb6795e3c1ca68b (diff) | |
parent | 805d4a0cff00fb4e0071bb300436bb7eefb8fb16 (diff) | |
download | uhd-a1d768d540d4f78ddf634033892459a5f1d3847f.tar.gz uhd-a1d768d540d4f78ddf634033892459a5f1d3847f.tar.bz2 uhd-a1d768d540d4f78ddf634033892459a5f1d3847f.zip |
Merge branch 'split_string' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e_merge
Diffstat (limited to 'host/lib/utils/paths.cpp')
-rw-r--r-- | host/lib/utils/paths.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp index 4029bd989..9ac20d855 100644 --- a/host/lib/utils/paths.cpp +++ b/host/lib/utils/paths.cpp @@ -17,7 +17,7 @@ #include "constants.hpp" #include <uhd/config.hpp> -#include <boost/algorithm/string.hpp> +#include <uhd/utils/algorithm.hpp> #include <boost/program_options.hpp> #include <boost/filesystem.hpp> #include <boost/foreach.hpp> @@ -58,15 +58,9 @@ static std::vector<fs::path> get_env_paths(const std::string &var_name){ po::store(po::parse_environment(desc, boost::bind(&name_mapper, var_name, _1)), vm); po::notify(vm); - //split the path at the path separators - std::vector<std::string> path_strings; - if (not var_value.empty()) boost::split(//dont split empty strings - path_strings, var_value, boost::is_any_of(env_path_sep) - ); - //convert to filesystem path, filter blank paths std::vector<fs::path> paths; - BOOST_FOREACH(std::string &path_string, path_strings){ + BOOST_FOREACH(const std::string &path_string, std::split_string(var_value, env_path_sep)){ if (path_string.empty()) continue; paths.push_back(fs::system_complete(path_string)); } |