diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-06-27 19:06:50 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-06-29 13:40:07 -0700 |
commit | 47cdd6319c74a7b823843aad5ff3fa370ed1e6ef (patch) | |
tree | 216e88f36dbb5ba0b933f0a5ec3c2a151e972589 /host/lib/usrp/x300 | |
parent | 412a7053cc0698fd8e1a09d9c40ec2f96cf629af (diff) | |
download | uhd-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/usrp/x300')
-rw-r--r-- | host/lib/usrp/x300/x300_fw_ctrl.cpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_impl.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_io_impl.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_radio_ctrl_impl.hpp | 2 |
4 files changed, 7 insertions, 8 deletions
diff --git a/host/lib/usrp/x300/x300_fw_ctrl.cpp b/host/lib/usrp/x300/x300_fw_ctrl.cpp index 38b7eb139..b8cb2075e 100644 --- a/host/lib/usrp/x300/x300_fw_ctrl.cpp +++ b/host/lib/usrp/x300/x300_fw_ctrl.cpp @@ -28,7 +28,6 @@ #include "x300_regs.hpp" #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/thread/thread.hpp> -#include <boost/lexical_cast.hpp> using namespace uhd; using namespace uhd::niusrprio; @@ -299,7 +298,7 @@ protected: virtual std::string __loc_info(void) { - return boost::lexical_cast<std::string>(_drv_proxy->get_interface_num()); + return std::to_string(_drv_proxy->get_interface_num()); } private: diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 4601b2789..40288b54c 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -524,7 +524,7 @@ void x300_impl::mboard_members_t::discover_eth( void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) { - const fs_path mb_path = "/mboards/"+boost::lexical_cast<std::string>(mb_i); + const fs_path mb_path = fs_path("/mboards") / mb_i; mboard_members_t &mb = _mb[mb_i]; mb.initialization_done = false; @@ -533,7 +533,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) ); const std::string thread_msg( "Thread ID " + thread_id + " for motherboard " - + boost::lexical_cast<std::string>(mb_i) + + std::to_string(mb_i) ); std::vector<std::string> eth_addrs; @@ -1204,7 +1204,7 @@ uhd::both_xports_t x300_impl::make_transport( * connection type.*/ size_t eth_data_rec_frame_size = 0; - fs_path mboard_path = fs_path("/mboards/"+boost::lexical_cast<std::string>(mb_index) / "link_max_rate"); + fs_path mboard_path = fs_path("/mboards") / mb_index / "link_max_rate"; if (mb.loaded_fpga_image == "HG") { size_t max_link_rate = 0; diff --git a/host/lib/usrp/x300/x300_io_impl.cpp b/host/lib/usrp/x300/x300_io_impl.cpp index eeff4091f..35d6f74f3 100644 --- a/host/lib/usrp/x300/x300_io_impl.cpp +++ b/host/lib/usrp/x300/x300_io_impl.cpp @@ -46,10 +46,10 @@ device_addr_t x300_impl::get_rx_hints(size_t mb_index) //For nirio, the buffer size is not configurable by the user #if defined(UHD_PLATFORM_MACOS) || defined(UHD_PLATFORM_BSD) //limit buffer resize on macos or it will error - rx_hints["recv_buff_size"] = boost::lexical_cast<std::string>(X300_RX_SW_BUFF_SIZE_ETH_MACOS); + rx_hints["recv_buff_size"] = std::to_string(X300_RX_SW_BUFF_SIZE_ETH_MACOS); #elif defined(UHD_PLATFORM_LINUX) || defined(UHD_PLATFORM_WIN32) //set to half-a-second of buffering at max rate - rx_hints["recv_buff_size"] = boost::lexical_cast<std::string>(X300_RX_SW_BUFF_SIZE_ETH); + rx_hints["recv_buff_size"] = std::to_string(X300_RX_SW_BUFF_SIZE_ETH); #endif } } diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp index 9e3f298d8..50c3059d3 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp @@ -158,7 +158,7 @@ private: misc_ins_reg_t(): uhd::soft_reg64_ro_t(regs::RB_MISC_IO) { } } misc_ins_reg; - radio_regmap_t(int radio_num) : soft_regmap_t("radio" + boost::lexical_cast<std::string>(radio_num) + "_regmap") { + radio_regmap_t(int radio_num) : soft_regmap_t("radio" + std::to_string(radio_num) + "_regmap") { add_to_map(misc_outs_reg, "misc_outs_reg", PRIVATE); add_to_map(misc_ins_reg, "misc_ins_reg", PRIVATE); } |