From 7a9169fe8cca1cb378be0d0d403e03a338ffbfda Mon Sep 17 00:00:00 2001
From: Thomas Habets <thomas@habets.se>
Date: Sat, 14 Mar 2020 12:01:44 +0000
Subject: 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>`.
---
 gr-blocks/lib/socket_pdu_impl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'gr-blocks/lib/socket_pdu_impl.h')

diff --git a/gr-blocks/lib/socket_pdu_impl.h b/gr-blocks/lib/socket_pdu_impl.h
index c684ad013f..2e6c935471 100644
--- a/gr-blocks/lib/socket_pdu_impl.h
+++ b/gr-blocks/lib/socket_pdu_impl.h
@@ -34,20 +34,20 @@ private:
     const bool d_tcp_no_delay;
 
     // TCP server specific
-    boost::shared_ptr<boost::asio::ip::tcp::acceptor> d_acceptor_tcp;
+    std::shared_ptr<boost::asio::ip::tcp::acceptor> d_acceptor_tcp;
     void start_tcp_accept();
     void tcp_server_send(pmt::pmt_t msg);
     void handle_tcp_accept(tcp_connection::sptr new_connection,
                            const boost::system::error_code& error);
 
     // TCP client specific
-    boost::shared_ptr<boost::asio::ip::tcp::socket> d_tcp_socket;
+    std::shared_ptr<boost::asio::ip::tcp::socket> d_tcp_socket;
     void tcp_client_send(pmt::pmt_t msg);
 
     // UDP specific
     boost::asio::ip::udp::endpoint d_udp_endpoint;
     boost::asio::ip::udp::endpoint d_udp_endpoint_other;
-    boost::shared_ptr<boost::asio::ip::udp::socket> d_udp_socket;
+    std::shared_ptr<boost::asio::ip::udp::socket> d_udp_socket;
     void handle_udp_read(const boost::system::error_code& error,
                          size_t bytes_transferred);
     void udp_send(pmt::pmt_t msg);
-- 
cgit v1.2.3