From 47cdd6319c74a7b823843aad5ff3fa370ed1e6ef Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 27 Jun 2017 19:06:50 -0700 Subject: uhd: Replaced many lexical_cast with appropriate C++11 equivalents --- host/examples/tx_waveforms.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'host/examples/tx_waveforms.cpp') diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index d596d9ed4..9e3c2cec6 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -25,11 +25,11 @@ #include #include #include -#include #include #include #include #include +#include namespace po = boost::program_options; @@ -93,11 +93,11 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::vector channel_nums; boost::split(channel_strings, channel_list, boost::is_any_of("\"',")); for(size_t ch = 0; ch < channel_strings.size(); ch++){ - size_t chan = boost::lexical_cast(channel_strings[ch]); + size_t chan = std::stoi(channel_strings[ch]); if(chan >= usrp->get_tx_num_channels()) throw std::runtime_error("Invalid channel(s) specified."); else - channel_nums.push_back(boost::lexical_cast(channel_strings[ch])); + channel_nums.push_back(std::stoi(channel_strings[ch])); } @@ -212,7 +212,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //Check Ref and LO Lock detect std::vector sensor_names; - const size_t tx_sensor_chan = channel_list.empty() ? 0 : boost::lexical_cast(channel_list[0]); + const size_t tx_sensor_chan = channel_nums.empty() ? 0 : channel_nums[0]; sensor_names = usrp->get_tx_sensor_names(tx_sensor_chan); if (std::find(sensor_names.begin(), sensor_names.end(), "lo_locked") != sensor_names.end()) { uhd::sensor_value_t lo_locked = usrp->get_tx_sensor("lo_locked", tx_sensor_chan); -- cgit v1.2.3