From 1fe98e8701dd0b790b172762c3629db32956d1fc Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 28 Sep 2019 11:18:57 +0200 Subject: uhd: Replace usage of boost smart pointers with C++11 counterparts This removes the following Boost constructs: - boost::shared_ptr, boost::weak_ptr - boost::enable_shared_from_this - boost::static_pointer_cast, boost::dynamic_pointer_cast The appropriate includes were also removed. All C++11 versions of these require #include . Note that the stdlib and Boost versions have the exact same syntax, they only differ in the namespace (boost vs. std). The modifications were all done using sed, with the exception of boost::scoped_ptr, which was replaced by std::unique_ptr. References to boost::smart_ptr were also removed. boost::intrusive_ptr is not removed in this commit, since it does not have a 1:1 mapping to a C++11 construct. --- host/lib/usrp/b200/b200_impl.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'host/lib/usrp/b200/b200_impl.hpp') diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp index 6e777d4d6..bd44aa14f 100644 --- a/host/lib/usrp/b200/b200_impl.hpp +++ b/host/lib/usrp/b200/b200_impl.hpp @@ -36,8 +36,8 @@ #include #include #include -#include #include +#include static const uint8_t B200_FW_COMPAT_NUM_MAJOR = 8; static const uint8_t B200_FW_COMPAT_NUM_MINOR = 0; @@ -138,7 +138,7 @@ private: uhd::usrp::ad9361_ctrl::sptr _codec_ctrl; uhd::usrp::ad936x_manager::sptr _codec_mgr; b200_local_spi_core::sptr _spi_iface; - boost::shared_ptr _adf4001_iface; + std::shared_ptr _adf4001_iface; uhd::gps_ctrl::sptr _gps; //transports @@ -146,8 +146,8 @@ private: uhd::transport::zero_copy_if::sptr _ctrl_transport; uhd::usrp::recv_packet_demuxer_3000::sptr _demux; - boost::weak_ptr _rx_streamer; - boost::weak_ptr _tx_streamer; + std::weak_ptr _rx_streamer; + std::weak_ptr _tx_streamer; std::mutex _transport_setup_mutex; @@ -156,13 +156,13 @@ private: typedef uhd::transport::bounded_buffer async_md_type; struct AsyncTaskData { - boost::shared_ptr async_md; - boost::weak_ptr local_ctrl; - boost::weak_ptr radio_ctrl[2]; + std::shared_ptr async_md; + std::weak_ptr local_ctrl; + std::weak_ptr radio_ctrl[2]; b200_uart::sptr gpsdo_uart; }; - boost::shared_ptr _async_task_data; - boost::optional handle_async_task(uhd::transport::zero_copy_if::sptr, boost::shared_ptr); + std::shared_ptr _async_task_data; + boost::optional handle_async_task(uhd::transport::zero_copy_if::sptr, std::shared_ptr); void register_loopback_self_test(uhd::wb_iface::sptr iface); void set_mb_eeprom(const uhd::usrp::mboard_eeprom_t &); @@ -191,8 +191,8 @@ private: rx_dsp_core_3000::sptr ddc; tx_vita_core_3000::sptr deframer; tx_dsp_core_3000::sptr duc; - boost::weak_ptr rx_streamer; - boost::weak_ptr tx_streamer; + std::weak_ptr rx_streamer; + std::weak_ptr tx_streamer; user_settings_core_3000::sptr user_settings; bool ant_rx2; }; -- cgit v1.2.3