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/usrp1/soft_time_ctrl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/usrp1/soft_time_ctrl.cpp') diff --git a/host/lib/usrp/usrp1/soft_time_ctrl.cpp b/host/lib/usrp/usrp1/soft_time_ctrl.cpp index 7f39caf8a..92031136d 100644 --- a/host/lib/usrp/usrp1/soft_time_ctrl.cpp +++ b/host/lib/usrp/usrp1/soft_time_ctrl.cpp @@ -8,7 +8,7 @@ #include "soft_time_ctrl.hpp" #include #include -#include +#include #include #include #include @@ -116,7 +116,7 @@ public: } void issue_stream_cmd(const stream_cmd_t &cmd){ - _cmd_queue.push_with_wait(boost::make_shared(cmd)); + _cmd_queue.push_with_wait(std::make_shared(cmd)); } void stream_on_off(bool enb){ @@ -190,7 +190,7 @@ public: } void recv_cmd_task(void){ //task is looped - boost::shared_ptr cmd; + std::shared_ptr cmd; if (_cmd_queue.pop_with_timed_wait(cmd, 0.25)) { recv_cmd_handle_cmd(*cmd); } @@ -213,7 +213,7 @@ private: size_t _nsamps_remaining; stream_cmd_t::stream_mode_t _stream_mode; time_spec_t _time_offset; - bounded_buffer > _cmd_queue; + bounded_buffer > _cmd_queue; bounded_buffer _async_msg_queue; bounded_buffer _inline_msg_queue; const cb_fcn_type _stream_on_off; -- cgit v1.2.3