diff options
author | Josh Blum <josh@joshknows.com> | 2010-08-13 12:20:11 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-08-13 12:20:11 -0700 |
commit | 6d2899d18661e4cec5ae90692e08404ea48bc112 (patch) | |
tree | 5029781c6408cb2d0bdd25ca92a5becd44183138 /host/lib/usrp/subdev_spec.cpp | |
parent | 8bdc6cda2b5cc33b3eaf7f51d21d51887b77f45b (diff) | |
parent | 805d4a0cff00fb4e0071bb300436bb7eefb8fb16 (diff) | |
download | uhd-6d2899d18661e4cec5ae90692e08404ea48bc112.tar.gz uhd-6d2899d18661e4cec5ae90692e08404ea48bc112.tar.bz2 uhd-6d2899d18661e4cec5ae90692e08404ea48bc112.zip |
Merge branch 'split_string' into next
Diffstat (limited to 'host/lib/usrp/subdev_spec.cpp')
-rw-r--r-- | host/lib/usrp/subdev_spec.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/host/lib/usrp/subdev_spec.cpp b/host/lib/usrp/subdev_spec.cpp index 0f00e2f74..765eecb3d 100644 --- a/host/lib/usrp/subdev_spec.cpp +++ b/host/lib/usrp/subdev_spec.cpp @@ -16,7 +16,7 @@ // #include <uhd/usrp/subdev_spec.hpp> -#include <boost/algorithm/string.hpp> +#include <uhd/utils/algorithm.hpp> #include <boost/format.hpp> #include <boost/foreach.hpp> #include <stdexcept> @@ -35,12 +35,9 @@ subdev_spec_pair_t::subdev_spec_pair_t( } subdev_spec_t::subdev_spec_t(const std::string &markup){ - std::vector<std::string> pairs; - boost::split(pairs, markup, boost::is_any_of("\t ")); - BOOST_FOREACH(const std::string &pair, pairs){ + BOOST_FOREACH(const std::string &pair, std::split_string(markup)){ if (pair == "") continue; - std::vector<std::string> db_sd; - boost::split(db_sd, pair, boost::is_any_of(":")); + std::vector<std::string> db_sd = std::split_string(pair, ":"); switch(db_sd.size()){ case 1: this->push_back(subdev_spec_pair_t("", db_sd.front())); break; case 2: this->push_back(subdev_spec_pair_t(db_sd.front(), db_sd.back())); break; |