diff options
author | Josh Blum <josh@joshknows.com> | 2010-06-16 00:35:55 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-06-16 00:35:55 +0000 |
commit | 2a2434d95e2eb10c629f33e7e67a6456bc4f6648 (patch) | |
tree | 4aa5acc9dbbbafbfcd4537d8f67a854da4781203 /host/lib/device.cpp | |
parent | b4b80f1f6e59fa02d508af860f1a572c9224b975 (diff) | |
parent | ca6417739de4e5344325e96887dcdbf8311e265b (diff) | |
download | uhd-2a2434d95e2eb10c629f33e7e67a6456bc4f6648.tar.gz uhd-2a2434d95e2eb10c629f33e7e67a6456bc4f6648.tar.bz2 uhd-2a2434d95e2eb10c629f33e7e67a6456bc4f6648.zip |
Merge branch 'sched' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'host/lib/device.cpp')
-rw-r--r-- | host/lib/device.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/host/lib/device.cpp b/host/lib/device.cpp index f139ecb20..431595c4f 100644 --- a/host/lib/device.cpp +++ b/host/lib/device.cpp @@ -19,13 +19,13 @@ #include <uhd/types/dict.hpp> #include <uhd/utils/assert.hpp> #include <uhd/utils/static.hpp> +#include <uhd/utils/algorithm.hpp> #include <boost/foreach.hpp> #include <boost/format.hpp> #include <boost/weak_ptr.hpp> #include <boost/functional/hash.hpp> #include <boost/tuple/tuple.hpp> #include <stdexcept> -#include <algorithm> using namespace uhd; @@ -41,13 +41,9 @@ using namespace uhd; static size_t hash_device_addr( const device_addr_t &dev_addr ){ - //sort the keys of the device address - std::vector<std::string> keys = dev_addr.keys(); - std::sort(keys.begin(), keys.end()); - //combine the hashes of sorted keys/value pairs size_t hash = 0; - BOOST_FOREACH(const std::string &key, keys){ + BOOST_FOREACH(const std::string &key, std::sorted(dev_addr.keys())){ boost::hash_combine(hash, key); boost::hash_combine(hash, dev_addr[key]); } |