aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/subdev_spec.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-12 10:08:17 -0700
committerJosh Blum <josh@joshknows.com>2010-08-12 10:08:17 -0700
commit805d4a0cff00fb4e0071bb300436bb7eefb8fb16 (patch)
treed3e076ecff7e6ce7899b7cb8da0e932ee5ca8236 /host/lib/usrp/subdev_spec.cpp
parentef6953024f1075a729e85f2511c75de337879888 (diff)
downloaduhd-805d4a0cff00fb4e0071bb300436bb7eefb8fb16.tar.gz
uhd-805d4a0cff00fb4e0071bb300436bb7eefb8fb16.tar.bz2
uhd-805d4a0cff00fb4e0071bb300436bb7eefb8fb16.zip
uhd: made split string utility function
Diffstat (limited to 'host/lib/usrp/subdev_spec.cpp')
-rw-r--r--host/lib/usrp/subdev_spec.cpp9
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;