diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-06 15:38:56 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-06 15:38:56 -0800 |
commit | 771b5cebda250f2a6a65aa7788e9051c94974c2b (patch) | |
tree | 78856934a0786b962d5acafde2eb3338ab5df582 /host/lib/usrp/usrp2/usrp2_impl.cpp | |
parent | 3d02c07470e83edfa118c7ff36e793ffa883ceff (diff) | |
download | uhd-771b5cebda250f2a6a65aa7788e9051c94974c2b.tar.gz uhd-771b5cebda250f2a6a65aa7788e9051c94974c2b.tar.bz2 uhd-771b5cebda250f2a6a65aa7788e9051c94974c2b.zip |
uhd: integrated boost split or tokenizer into source files, remove string split from algorithms header
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index f910999d4..06ca61e13 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -22,7 +22,7 @@ #include <uhd/utils/assert.hpp> #include <uhd/utils/static.hpp> #include <uhd/utils/warning.hpp> -#include <uhd/utils/algorithm.hpp> +#include <boost/algorithm/string.hpp> //for split #include <boost/assign/list_of.hpp> #include <boost/format.hpp> #include <boost/foreach.hpp> @@ -31,6 +31,7 @@ #include <boost/bind.hpp> #include <boost/asio.hpp> //htonl and ntohl #include <iostream> +#include <vector> using namespace uhd; using namespace uhd::usrp; @@ -47,8 +48,8 @@ template <class T> std::string num2str(T num){ //! separate indexed device addresses into a vector of device addresses device_addrs_t sep_indexed_dev_addrs(const device_addr_t &dev_addr){ //------------ support old deprecated way and print warning -------- - if (dev_addr.has_key("addr")){ - std::vector<std::string> addrs = std::split_string(dev_addr["addr"]); + if (dev_addr.has_key("addr") and not dev_addr["addr"].empty()){ + std::vector<std::string> addrs; boost::split(addrs, dev_addr["addr"], boost::is_any_of(" ")); if (addrs.size() > 1){ device_addr_t fixed_dev_addr = dev_addr; fixed_dev_addr.pop("addr"); |