diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-09-28 11:18:57 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 12:21:32 -0800 |
commit | 1fe98e8701dd0b790b172762c3629db32956d1fc (patch) | |
tree | 7719e69633f9639f1dcdcf00ebf7db6c4cd6dda2 /host/lib/usrp/b200/b200_impl.hpp | |
parent | 8541a9b397fb53034c37dd00289aa96def24d410 (diff) | |
download | uhd-1fe98e8701dd0b790b172762c3629db32956d1fc.tar.gz uhd-1fe98e8701dd0b790b172762c3629db32956d1fc.tar.bz2 uhd-1fe98e8701dd0b790b172762c3629db32956d1fc.zip |
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 <memory>.
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.
Diffstat (limited to 'host/lib/usrp/b200/b200_impl.hpp')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.hpp | 22 |
1 files changed, 11 insertions, 11 deletions
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 <uhdlib/usrp/common/ad936x_manager.hpp> #include <uhdlib/usrp/common/adf4001_ctrl.hpp> #include <boost/assign.hpp> -#include <boost/weak_ptr.hpp> #include <mutex> +#include <memory> 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<uhd::usrp::adf4001_ctrl> _adf4001_iface; + std::shared_ptr<uhd::usrp::adf4001_ctrl> _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<uhd::rx_streamer> _rx_streamer; - boost::weak_ptr<uhd::tx_streamer> _tx_streamer; + std::weak_ptr<uhd::rx_streamer> _rx_streamer; + std::weak_ptr<uhd::tx_streamer> _tx_streamer; std::mutex _transport_setup_mutex; @@ -156,13 +156,13 @@ private: typedef uhd::transport::bounded_buffer<uhd::async_metadata_t> async_md_type; struct AsyncTaskData { - boost::shared_ptr<async_md_type> async_md; - boost::weak_ptr<radio_ctrl_core_3000> local_ctrl; - boost::weak_ptr<radio_ctrl_core_3000> radio_ctrl[2]; + std::shared_ptr<async_md_type> async_md; + std::weak_ptr<radio_ctrl_core_3000> local_ctrl; + std::weak_ptr<radio_ctrl_core_3000> radio_ctrl[2]; b200_uart::sptr gpsdo_uart; }; - boost::shared_ptr<AsyncTaskData> _async_task_data; - boost::optional<uhd::msg_task::msg_type_t> handle_async_task(uhd::transport::zero_copy_if::sptr, boost::shared_ptr<AsyncTaskData>); + std::shared_ptr<AsyncTaskData> _async_task_data; + boost::optional<uhd::msg_task::msg_type_t> handle_async_task(uhd::transport::zero_copy_if::sptr, std::shared_ptr<AsyncTaskData>); 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<uhd::rx_streamer> rx_streamer; - boost::weak_ptr<uhd::tx_streamer> tx_streamer; + std::weak_ptr<uhd::rx_streamer> rx_streamer; + std::weak_ptr<uhd::tx_streamer> tx_streamer; user_settings_core_3000::sptr user_settings; bool ant_rx2; }; |