aboutsummaryrefslogtreecommitdiffstats
path: root/gr-network
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2020-05-03 12:23:51 +0100
committerMarcus Müller <marcus@hostalia.de>2020-07-30 18:12:44 +0200
commit30643f01609e915296023adc37123e27e2c86d3f (patch)
treecaf7141e8091cd30cde4e75ef0d1fcc5454ace77 /gr-network
parentutils/modtool: switch to `make_block_sptr` in template (diff)
downloadgnuradio-30643f01609e915296023adc37123e27e2c86d3f.tar.xz
gnuradio-30643f01609e915296023adc37123e27e2c86d3f.zip
Replace all calls to `get_initial_sptr` with `make_block_sptr`
First batch of changes: ``` find […] -print0 | xargs -0 sed -i -r '/get_initial_sptr/{:nxt N;/;/!b nxt;s/get_initial_sptr\(\s*new ([^(]+)(.*)\)\)/make_block_sptr<\1>\2)/}' ``` Then: * Back out `sptr_magic.h` edits * Change some `friend` clauses * clang-format the whole thing * Update checksums in the pybind11 bindings files
Diffstat (limited to 'gr-network')
-rw-r--r--gr-network/lib/tcp_sink_impl.cc4
-rw-r--r--gr-network/lib/udp_sink_impl.cc4
-rw-r--r--gr-network/lib/udp_source_impl.cc16
3 files changed, 12 insertions, 12 deletions
diff --git a/gr-network/lib/tcp_sink_impl.cc b/gr-network/lib/tcp_sink_impl.cc
index 3726f510b..0c596d1d3 100644
--- a/gr-network/lib/tcp_sink_impl.cc
+++ b/gr-network/lib/tcp_sink_impl.cc
@@ -23,8 +23,8 @@ namespace network {
tcp_sink::sptr tcp_sink::make(
size_t itemsize, size_t veclen, const std::string& host, int port, int sinkmode)
{
- return gnuradio::get_initial_sptr(
- new tcp_sink_impl(itemsize, veclen, host, port, sinkmode));
+ return gnuradio::make_block_sptr<tcp_sink_impl>(
+ itemsize, veclen, host, port, sinkmode);
}
/*
diff --git a/gr-network/lib/udp_sink_impl.cc b/gr-network/lib/udp_sink_impl.cc
index 5c2f3d1a7..7dce7625e 100644
--- a/gr-network/lib/udp_sink_impl.cc
+++ b/gr-network/lib/udp_sink_impl.cc
@@ -27,8 +27,8 @@ udp_sink::sptr udp_sink::make(size_t itemsize,
int payloadsize,
bool send_eof)
{
- return gnuradio::get_initial_sptr(new udp_sink_impl(
- itemsize, veclen, host, port, header_type, payloadsize, send_eof));
+ return gnuradio::make_block_sptr<udp_sink_impl>(
+ itemsize, veclen, host, port, header_type, payloadsize, send_eof);
}
/*
diff --git a/gr-network/lib/udp_source_impl.cc b/gr-network/lib/udp_source_impl.cc
index 4758b9e21..3b89e87be 100644
--- a/gr-network/lib/udp_source_impl.cc
+++ b/gr-network/lib/udp_source_impl.cc
@@ -28,14 +28,14 @@ udp_source::sptr udp_source::make(size_t itemsize,
bool source_zeros,
bool ipv6)
{
- return gnuradio::get_initial_sptr(new udp_source_impl(itemsize,
- veclen,
- port,
- header_type,
- payloadsize,
- notify_missed,
- source_zeros,
- ipv6));
+ return gnuradio::make_block_sptr<udp_source_impl>(itemsize,
+ veclen,
+ port,
+ header_type,
+ payloadsize,
+ notify_missed,
+ source_zeros,
+ ipv6);
}
/*