aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard_id.cpp
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2014-03-25 15:59:03 -0700
committermichael-west <michael.west@ettus.com>2014-03-25 15:59:03 -0700
commit04292f9b109479b639add31f83fd240a6387f488 (patch)
tree4b8723a4ae63626029704f901ee0083bb23bc1e9 /host/lib/usrp/dboard_id.cpp
parent09915aa57bc88099cbcbbe925946ae65bc0ad8f0 (diff)
parentff8a1252f3a51369abe0a165d963b781089ec66c (diff)
downloaduhd-04292f9b109479b639add31f83fd240a6387f488.tar.gz
uhd-04292f9b109479b639add31f83fd240a6387f488.tar.bz2
uhd-04292f9b109479b639add31f83fd240a6387f488.zip
Merge branch 'master' into mwest/b200_docs
Diffstat (limited to 'host/lib/usrp/dboard_id.cpp')
-rw-r--r--host/lib/usrp/dboard_id.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/host/lib/usrp/dboard_id.cpp b/host/lib/usrp/dboard_id.cpp
index 3028d2a3b..557e13914 100644
--- a/host/lib/usrp/dboard_id.cpp
+++ b/host/lib/usrp/dboard_id.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010,2014 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -51,7 +51,10 @@ template <class T> struct to_hex{
dboard_id_t dboard_id_t::from_string(const std::string &string){
if (string.substr(0, 2) == "0x"){
- return dboard_id_t::from_uint16(boost::lexical_cast<to_hex<boost::uint16_t> >(string));
+ std::stringstream interpreter(string);
+ to_hex<boost::uint16_t> hh;
+ interpreter >> hh;
+ return dboard_id_t::from_uint16(hh);
}
return dboard_id_t::from_uint16(boost::lexical_cast<boost::uint16_t>(string));
}