aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/types
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-06-27 19:06:50 -0700
committerMartin Braun <martin.braun@ettus.com>2017-06-29 13:40:07 -0700
commit47cdd6319c74a7b823843aad5ff3fa370ed1e6ef (patch)
tree216e88f36dbb5ba0b933f0a5ec3c2a151e972589 /host/lib/types
parent412a7053cc0698fd8e1a09d9c40ec2f96cf629af (diff)
downloaduhd-47cdd6319c74a7b823843aad5ff3fa370ed1e6ef.tar.gz
uhd-47cdd6319c74a7b823843aad5ff3fa370ed1e6ef.tar.bz2
uhd-47cdd6319c74a7b823843aad5ff3fa370ed1e6ef.zip
uhd: Replaced many lexical_cast with appropriate C++11 equivalents
Diffstat (limited to 'host/lib/types')
-rw-r--r--host/lib/types/sensors.cpp5
-rw-r--r--host/lib/types/sensors_c.cpp5
2 files changed, 3 insertions, 7 deletions
diff --git a/host/lib/types/sensors.cpp b/host/lib/types/sensors.cpp
index 0406e35d4..5ac48dc4b 100644
--- a/host/lib/types/sensors.cpp
+++ b/host/lib/types/sensors.cpp
@@ -17,7 +17,6 @@
#include <uhd/types/sensors.hpp>
#include <uhd/exception.hpp>
-#include <boost/lexical_cast.hpp>
#include <boost/format.hpp>
using namespace uhd;
@@ -92,11 +91,11 @@ bool sensor_value_t::to_bool(void) const{
}
signed sensor_value_t::to_int(void) const{
- return boost::lexical_cast<signed>(value);
+ return std::stoi(value);
}
double sensor_value_t::to_real(void) const{
- return boost::lexical_cast<double>(value);
+ return std::stod(value);
}
sensor_value_t& sensor_value_t::operator=(const sensor_value_t& rhs)
diff --git a/host/lib/types/sensors_c.cpp b/host/lib/types/sensors_c.cpp
index f1976c102..cec4fbaff 100644
--- a/host/lib/types/sensors_c.cpp
+++ b/host/lib/types/sensors_c.cpp
@@ -16,12 +16,9 @@
//
#include <uhd/types/sensors.h>
-
-#include <boost/lexical_cast.hpp>
-
#include <stdexcept>
-#include <string.h>
#include <string>
+#include <string.h>
uhd_error uhd_sensor_value_make_from_bool(
uhd_sensor_value_handle* h,