diff options
author | Josh Blum <josh@joshknows.com> | 2010-02-12 18:43:21 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-02-12 18:43:21 -0800 |
commit | 259f5babf1e1bc1595ad54c6588c1ff5117dc2e3 (patch) | |
tree | cd4e82dfd650b69d9d36d7c95f34bd76ede4972b /lib/usrp/dboard/id.cpp | |
parent | 9fff25f4e5da179ea29ff44278e0415a337870cb (diff) | |
download | uhd-259f5babf1e1bc1595ad54c6588c1ff5117dc2e3.tar.gz uhd-259f5babf1e1bc1595ad54c6588c1ff5117dc2e3.tar.bz2 uhd-259f5babf1e1bc1595ad54c6588c1ff5117dc2e3.zip |
Made use of templated dict to replace used of map
and to get rid of utility call.
Diffstat (limited to 'lib/usrp/dboard/id.cpp')
-rw-r--r-- | lib/usrp/dboard/id.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/usrp/dboard/id.cpp b/lib/usrp/dboard/id.cpp index b55028a11..0f173ef14 100644 --- a/lib/usrp/dboard/id.cpp +++ b/lib/usrp/dboard/id.cpp @@ -16,21 +16,19 @@ // #include <uhd/usrp/dboard/id.hpp> -#include <boost/assign/list_of.hpp> #include <boost/format.hpp> -#include <map> +#include <uhd/dict.hpp> using namespace uhd::usrp::dboard; std::ostream& operator<<(std::ostream &os, const dboard_id_t &id){ //map the dboard ids to string representations - std::map<dboard_id_t, std::string> id_to_str = boost::assign::map_list_of - (ID_BASIC_TX, "basic tx") - (ID_BASIC_RX, "basic rx") - ; + uhd::dict<dboard_id_t, std::string> id_to_str; + id_to_str[ID_BASIC_TX] = "basic tx"; + id_to_str[ID_BASIC_RX] = "basic rx"; //get the string representation - if (id_to_str.count(id) != 0){ + if (id_to_str.has_key(id)){ os << id_to_str[id]; } else{ |