diff options
author | Thomas Habets <thomas@habets.se> | 2020-03-14 12:01:44 +0000 |
---|---|---|
committer | Michael Dickens <michael.dickens@ettus.com> | 2020-04-01 11:44:45 -0400 |
commit | 7a9169fe8cca1cb378be0d0d403e03a338ffbfda (patch) | |
tree | fef77ae9c34538b78e4172580cb5ecdc24d40134 /gnuradio-runtime/include/pmt/pmt.h | |
parent | 82262753a56d15cfa6343044c726cf0035c38d9c (diff) |
Switch from boost pointers to std C++11 pointers
Most of this code is automated code changes:
```
set -e
SUB="s/dummy/dummy/"
for i in shared_ptr make_shared dynamic_pointer_cast weak_ptr enable_shared_from_this get_deleter; do
SUB="$SUB;s/boost::$i/std::$i/g"
done
SUB="$SUB;s^#include <boost/shared_ptr.hpp>^#include <memory>^g"
SUB="$SUB;s^namespace boost^namespace std^g"
find . \( -name "*.cc" -o -name "*.h" -o -name "*.i" -o -name "*.cxx" -o -name "*.py" \) -print0 | xargs -0 sed -i "$SUB"
```
Only one manual change. In `./gr-fec/lib/fec_mtrx_impl.cc`, add
`#include <algorithm>`.
Diffstat (limited to 'gnuradio-runtime/include/pmt/pmt.h')
-rw-r--r-- | gnuradio-runtime/include/pmt/pmt.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gnuradio-runtime/include/pmt/pmt.h b/gnuradio-runtime/include/pmt/pmt.h index a96d5f22f7..886762ffa2 100644 --- a/gnuradio-runtime/include/pmt/pmt.h +++ b/gnuradio-runtime/include/pmt/pmt.h @@ -15,9 +15,9 @@ #include <stdint.h> #include <boost/any.hpp> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> #include <complex> #include <iosfwd> +#include <memory> #include <stdexcept> #include <string> #include <vector> @@ -81,7 +81,7 @@ public: * \brief typedef for shared pointer (transparent reference counting). * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm */ -typedef boost::shared_ptr<pmt_base> pmt_t; +typedef std::shared_ptr<pmt_base> pmt_t; class PMT_API exception : public std::logic_error { @@ -703,10 +703,10 @@ PMT_API void any_set(pmt_t obj, const boost::any& any); PMT_API bool is_msg_accepter(const pmt_t& obj); //! make a msg_accepter -PMT_API pmt_t make_msg_accepter(boost::shared_ptr<gr::messages::msg_accepter> ma); +PMT_API pmt_t make_msg_accepter(std::shared_ptr<gr::messages::msg_accepter> ma); //! Return underlying msg_accepter -PMT_API boost::shared_ptr<gr::messages::msg_accepter> msg_accepter_ref(const pmt_t& obj); +PMT_API std::shared_ptr<gr::messages::msg_accepter> msg_accepter_ref(const pmt_t& obj); /* * ------------------------------------------------------------------------ |