summaryrefslogtreecommitdiff
path: root/gr-blocks/lib/tcp_connection.h
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2020-03-14 12:01:44 +0000
committerMichael Dickens <michael.dickens@ettus.com>2020-04-01 11:44:45 -0400
commit7a9169fe8cca1cb378be0d0d403e03a338ffbfda (patch)
treefef77ae9c34538b78e4172580cb5ecdc24d40134 /gr-blocks/lib/tcp_connection.h
parent82262753a56d15cfa6343044c726cf0035c38d9c (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 'gr-blocks/lib/tcp_connection.h')
-rw-r--r--gr-blocks/lib/tcp_connection.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gr-blocks/lib/tcp_connection.h b/gr-blocks/lib/tcp_connection.h
index 3841ce588e..2dd914ab71 100644
--- a/gr-blocks/lib/tcp_connection.h
+++ b/gr-blocks/lib/tcp_connection.h
@@ -14,7 +14,7 @@
#include <pmt/pmt.h>
#include <boost/array.hpp>
#include <boost/asio.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace gr {
@@ -35,7 +35,7 @@ private:
bool no_delay = false);
public:
- typedef boost::shared_ptr<tcp_connection> sptr;
+ typedef std::shared_ptr<tcp_connection> sptr;
static sptr
make(boost::asio::io_service& io_service, int MTU = 10000, bool no_delay = false);
@@ -45,7 +45,7 @@ public:
void start(gr::basic_block* block);
void send(pmt::pmt_t vector);
void handle_read(const boost::system::error_code& error, size_t bytes_transferred);
- void handle_write(boost::shared_ptr<char[]> txbuf,
+ void handle_write(std::shared_ptr<char[]> txbuf,
const boost::system::error_code& error,
size_t bytes_transferred)
{