Package: gnuradio / 3.7.13.4-4

runtime-replace-std-auto_ptr-usage-with-std-unique_p Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From f62c0a314d68ea3d3358e8b53b361067e67f8e1a Mon Sep 17 00:00:00 2001
From: Johnathan Corgan <johnathan@corganlabs.com>
Date: Mon, 17 Apr 2017 08:41:26 -0700
Subject: [PATCH 20/27] runtime: replace std::auto_ptr usage with
 std::unique_ptr

---
 gnuradio-runtime/include/gnuradio/rpcmanager.h         | 4 ++--
 gnuradio-runtime/lib/controlport/rpcserver_selector.cc | 4 ++--
 gnuradio-runtime/lib/thread/thread_group.cc            | 2 +-
 gr-blocks/lib/tcp_server_sink_impl.h                   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

--- a/gnuradio-runtime/include/gnuradio/rpcmanager.h
+++ b/gnuradio-runtime/include/gnuradio/rpcmanager.h
@@ -54,8 +54,8 @@
   static bool booter_registered;
   static bool aggregator_registered;
   static void rpcserver_booter_base_sptr_dest(rpcserver_booter_base* b) {;}
-  static std::auto_ptr<rpcserver_booter_base> boot;
-  static std::auto_ptr<rpcserver_booter_aggregator> aggregator;
+  static std::unique_ptr<rpcserver_booter_base> boot;
+  static std::unique_ptr<rpcserver_booter_aggregator> aggregator;
 };
 
 #endif /* RPCMANAGER_H */
--- a/gnuradio-runtime/lib/controlport/rpcserver_selector.cc
+++ b/gnuradio-runtime/lib/controlport/rpcserver_selector.cc
@@ -27,8 +27,8 @@
 bool rpcmanager::make_aggregator(false);
 bool rpcmanager::booter_registered(false);
 bool rpcmanager::aggregator_registered(false);
-std::auto_ptr<rpcserver_booter_base> rpcmanager::boot(0);
-std::auto_ptr<rpcserver_booter_aggregator> rpcmanager::aggregator(0);
+std::unique_ptr<rpcserver_booter_base> rpcmanager::boot;
+std::unique_ptr<rpcserver_booter_aggregator> rpcmanager::aggregator;
 
 #ifdef GR_RPCSERVER_ENABLED
 rpcmanager manager_instance;
--- a/gnuradio-runtime/lib/thread/thread_group.cc
+++ b/gnuradio-runtime/lib/thread/thread_group.cc
@@ -37,7 +37,7 @@
     {
       // No scoped_lock required here since the only "shared data" that's
       // modified here occurs inside add_thread which does scoped_lock.
-      std::auto_ptr<boost::thread> thrd(new boost::thread(threadfunc));
+      std::unique_ptr<boost::thread> thrd(new boost::thread(threadfunc));
       add_thread(thrd.get());
       return thrd.release();
     }
--- a/gr-blocks/lib/tcp_server_sink_impl.h
+++ b/gr-blocks/lib/tcp_server_sink_impl.h
@@ -39,7 +39,7 @@
       boost::asio::io_service d_io_service;
       gr::thread::thread d_io_serv_thread;
       boost::asio::ip::tcp::endpoint d_endpoint;
-      std::auto_ptr<boost::asio::ip::tcp::socket> d_socket;
+      std::unique_ptr<boost::asio::ip::tcp::socket> d_socket;
       std::set<boost::asio::ip::tcp::socket *> d_sockets;
       boost::asio::ip::tcp::acceptor d_acceptor;