diff options
author | Thomas Habets <thomas@habets.se> | 2020-05-03 12:23:51 +0100 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2020-07-30 18:12:44 +0200 |
commit | 30643f01609e915296023adc37123e27e2c86d3f (patch) | |
tree | caf7141e8091cd30cde4e75ef0d1fcc5454ace77 /gr-vocoder | |
parent | 875148321bca3c39af9aec8dee3c24eb9f75d1e6 (diff) |
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-vocoder')
-rw-r--r-- | gr-vocoder/lib/alaw_decode_bs_impl.cc | 2 | ||||
-rw-r--r-- | gr-vocoder/lib/alaw_encode_sb_impl.cc | 2 | ||||
-rw-r--r-- | gr-vocoder/lib/codec2_decode_ps_impl.cc | 4 | ||||
-rw-r--r-- | gr-vocoder/lib/codec2_encode_sp_impl.cc | 4 | ||||
-rw-r--r-- | gr-vocoder/lib/cvsd_decode_bs_impl.cc | 4 | ||||
-rw-r--r-- | gr-vocoder/lib/cvsd_encode_sb_impl.cc | 4 | ||||
-rw-r--r-- | gr-vocoder/lib/freedv_rx_ss_impl.cc | 4 | ||||
-rw-r--r-- | gr-vocoder/lib/freedv_tx_ss_impl.cc | 3 | ||||
-rw-r--r-- | gr-vocoder/lib/g721_decode_bs_impl.cc | 2 | ||||
-rw-r--r-- | gr-vocoder/lib/g721_encode_sb_impl.cc | 2 | ||||
-rw-r--r-- | gr-vocoder/lib/g723_24_decode_bs_impl.cc | 2 | ||||
-rw-r--r-- | gr-vocoder/lib/g723_24_encode_sb_impl.cc | 2 | ||||
-rw-r--r-- | gr-vocoder/lib/g723_40_decode_bs_impl.cc | 2 | ||||
-rw-r--r-- | gr-vocoder/lib/g723_40_encode_sb_impl.cc | 2 | ||||
-rw-r--r-- | gr-vocoder/lib/gsm_fr_decode_ps_impl.cc | 2 | ||||
-rw-r--r-- | gr-vocoder/lib/gsm_fr_encode_sp_impl.cc | 2 | ||||
-rw-r--r-- | gr-vocoder/lib/ulaw_decode_bs_impl.cc | 2 | ||||
-rw-r--r-- | gr-vocoder/lib/ulaw_encode_sb_impl.cc | 2 |
18 files changed, 23 insertions, 24 deletions
diff --git a/gr-vocoder/lib/alaw_decode_bs_impl.cc b/gr-vocoder/lib/alaw_decode_bs_impl.cc index f2703a69c3..41b48e5e77 100644 --- a/gr-vocoder/lib/alaw_decode_bs_impl.cc +++ b/gr-vocoder/lib/alaw_decode_bs_impl.cc @@ -25,7 +25,7 @@ extern "C" { alaw_decode_bs::sptr alaw_decode_bs::make() { - return gnuradio::get_initial_sptr(new alaw_decode_bs_impl()); + return gnuradio::make_block_sptr<alaw_decode_bs_impl>(); } alaw_decode_bs_impl::alaw_decode_bs_impl() diff --git a/gr-vocoder/lib/alaw_encode_sb_impl.cc b/gr-vocoder/lib/alaw_encode_sb_impl.cc index 2c4cc79e57..e3f5f4ed05 100644 --- a/gr-vocoder/lib/alaw_encode_sb_impl.cc +++ b/gr-vocoder/lib/alaw_encode_sb_impl.cc @@ -25,7 +25,7 @@ extern "C" { alaw_encode_sb::sptr alaw_encode_sb::make() { - return gnuradio::get_initial_sptr(new alaw_encode_sb_impl()); + return gnuradio::make_block_sptr<alaw_encode_sb_impl>(); } alaw_encode_sb_impl::alaw_encode_sb_impl() diff --git a/gr-vocoder/lib/codec2_decode_ps_impl.cc b/gr-vocoder/lib/codec2_decode_ps_impl.cc index 3db105f6c5..40d5059e9f 100644 --- a/gr-vocoder/lib/codec2_decode_ps_impl.cc +++ b/gr-vocoder/lib/codec2_decode_ps_impl.cc @@ -36,8 +36,8 @@ codec2_decode_ps::sptr codec2_decode_ps::make(int mode) bits_per_frame = codec2_bits_per_frame(codec2); codec2_destroy(codec2); - return gnuradio::get_initial_sptr( - new codec2_decode_ps_impl(mode, samples_per_frame, bits_per_frame)); + return gnuradio::make_block_sptr<codec2_decode_ps_impl>( + mode, samples_per_frame, bits_per_frame); } diff --git a/gr-vocoder/lib/codec2_encode_sp_impl.cc b/gr-vocoder/lib/codec2_encode_sp_impl.cc index 3b5413067c..c019e31cbe 100644 --- a/gr-vocoder/lib/codec2_encode_sp_impl.cc +++ b/gr-vocoder/lib/codec2_encode_sp_impl.cc @@ -37,8 +37,8 @@ codec2_encode_sp::sptr codec2_encode_sp::make(int mode) bits_per_frame = codec2_bits_per_frame(codec2); codec2_destroy(codec2); - return gnuradio::get_initial_sptr( - new codec2_encode_sp_impl(mode, samples_per_frame, bits_per_frame)); + return gnuradio::make_block_sptr<codec2_encode_sp_impl>( + mode, samples_per_frame, bits_per_frame); } codec2_encode_sp_impl::codec2_encode_sp_impl(int mode, diff --git a/gr-vocoder/lib/cvsd_decode_bs_impl.cc b/gr-vocoder/lib/cvsd_decode_bs_impl.cc index 3aa24f3f52..f88b86d673 100644 --- a/gr-vocoder/lib/cvsd_decode_bs_impl.cc +++ b/gr-vocoder/lib/cvsd_decode_bs_impl.cc @@ -28,8 +28,8 @@ cvsd_decode_bs::sptr cvsd_decode_bs::make(short min_step, short pos_accum_max, short neg_accum_max) { - return gnuradio::get_initial_sptr(new cvsd_decode_bs_impl( - min_step, max_step, step_decay, accum_decay, K, J, pos_accum_max, neg_accum_max)); + return gnuradio::make_block_sptr<cvsd_decode_bs_impl>( + min_step, max_step, step_decay, accum_decay, K, J, pos_accum_max, neg_accum_max); } cvsd_decode_bs_impl::cvsd_decode_bs_impl(short min_step, diff --git a/gr-vocoder/lib/cvsd_encode_sb_impl.cc b/gr-vocoder/lib/cvsd_encode_sb_impl.cc index 6b60b59e07..1cb6f2f13b 100644 --- a/gr-vocoder/lib/cvsd_encode_sb_impl.cc +++ b/gr-vocoder/lib/cvsd_encode_sb_impl.cc @@ -28,8 +28,8 @@ cvsd_encode_sb::sptr cvsd_encode_sb::make(short min_step, short pos_accum_max, short neg_accum_max) { - return gnuradio::get_initial_sptr(new cvsd_encode_sb_impl( - min_step, max_step, step_decay, accum_decay, K, J, pos_accum_max, neg_accum_max)); + return gnuradio::make_block_sptr<cvsd_encode_sb_impl>( + min_step, max_step, step_decay, accum_decay, K, J, pos_accum_max, neg_accum_max); } cvsd_encode_sb_impl::cvsd_encode_sb_impl(short min_step, diff --git a/gr-vocoder/lib/freedv_rx_ss_impl.cc b/gr-vocoder/lib/freedv_rx_ss_impl.cc index 838408ec38..03bfdda08f 100644 --- a/gr-vocoder/lib/freedv_rx_ss_impl.cc +++ b/gr-vocoder/lib/freedv_rx_ss_impl.cc @@ -38,8 +38,8 @@ namespace vocoder { freedv_rx_ss::sptr freedv_rx_ss::make(int mode, float squelch_thresh, int interleave_frames) { - return gnuradio::get_initial_sptr( - new freedv_rx_ss_impl(mode, squelch_thresh, interleave_frames)); + return gnuradio::make_block_sptr<freedv_rx_ss_impl>( + mode, squelch_thresh, interleave_frames); } freedv_rx_ss_impl::freedv_rx_ss_impl(int mode, diff --git a/gr-vocoder/lib/freedv_tx_ss_impl.cc b/gr-vocoder/lib/freedv_tx_ss_impl.cc index 333f2adbbd..310a2137e6 100644 --- a/gr-vocoder/lib/freedv_tx_ss_impl.cc +++ b/gr-vocoder/lib/freedv_tx_ss_impl.cc @@ -43,8 +43,7 @@ namespace vocoder { freedv_tx_ss::sptr freedv_tx_ss::make(int mode, const std::string msg_txt, int interleave_frames) { - return gnuradio::get_initial_sptr( - new freedv_tx_ss_impl(mode, msg_txt, interleave_frames)); + return gnuradio::make_block_sptr<freedv_tx_ss_impl>(mode, msg_txt, interleave_frames); } freedv_tx_ss_impl::freedv_tx_ss_impl(int mode, diff --git a/gr-vocoder/lib/g721_decode_bs_impl.cc b/gr-vocoder/lib/g721_decode_bs_impl.cc index 2db0b57503..319f300da2 100644 --- a/gr-vocoder/lib/g721_decode_bs_impl.cc +++ b/gr-vocoder/lib/g721_decode_bs_impl.cc @@ -21,7 +21,7 @@ namespace vocoder { g721_decode_bs::sptr g721_decode_bs::make() { - return gnuradio::get_initial_sptr(new g721_decode_bs_impl()); + return gnuradio::make_block_sptr<g721_decode_bs_impl>(); } g721_decode_bs_impl::g721_decode_bs_impl() diff --git a/gr-vocoder/lib/g721_encode_sb_impl.cc b/gr-vocoder/lib/g721_encode_sb_impl.cc index faeee26121..b02b34ba43 100644 --- a/gr-vocoder/lib/g721_encode_sb_impl.cc +++ b/gr-vocoder/lib/g721_encode_sb_impl.cc @@ -21,7 +21,7 @@ namespace vocoder { g721_encode_sb::sptr g721_encode_sb::make() { - return gnuradio::get_initial_sptr(new g721_encode_sb_impl()); + return gnuradio::make_block_sptr<g721_encode_sb_impl>(); } g721_encode_sb_impl::g721_encode_sb_impl() diff --git a/gr-vocoder/lib/g723_24_decode_bs_impl.cc b/gr-vocoder/lib/g723_24_decode_bs_impl.cc index 6a446453bc..a05c292d5d 100644 --- a/gr-vocoder/lib/g723_24_decode_bs_impl.cc +++ b/gr-vocoder/lib/g723_24_decode_bs_impl.cc @@ -21,7 +21,7 @@ namespace vocoder { g723_24_decode_bs::sptr g723_24_decode_bs::make() { - return gnuradio::get_initial_sptr(new g723_24_decode_bs_impl()); + return gnuradio::make_block_sptr<g723_24_decode_bs_impl>(); } g723_24_decode_bs_impl::g723_24_decode_bs_impl() diff --git a/gr-vocoder/lib/g723_24_encode_sb_impl.cc b/gr-vocoder/lib/g723_24_encode_sb_impl.cc index 367dc24961..9f4899ee20 100644 --- a/gr-vocoder/lib/g723_24_encode_sb_impl.cc +++ b/gr-vocoder/lib/g723_24_encode_sb_impl.cc @@ -21,7 +21,7 @@ namespace vocoder { g723_24_encode_sb::sptr g723_24_encode_sb::make() { - return gnuradio::get_initial_sptr(new g723_24_encode_sb_impl()); + return gnuradio::make_block_sptr<g723_24_encode_sb_impl>(); } g723_24_encode_sb_impl::g723_24_encode_sb_impl() diff --git a/gr-vocoder/lib/g723_40_decode_bs_impl.cc b/gr-vocoder/lib/g723_40_decode_bs_impl.cc index 99c5ee9646..ebf6aeb20b 100644 --- a/gr-vocoder/lib/g723_40_decode_bs_impl.cc +++ b/gr-vocoder/lib/g723_40_decode_bs_impl.cc @@ -21,7 +21,7 @@ namespace vocoder { g723_40_decode_bs::sptr g723_40_decode_bs::make() { - return gnuradio::get_initial_sptr(new g723_40_decode_bs_impl()); + return gnuradio::make_block_sptr<g723_40_decode_bs_impl>(); } g723_40_decode_bs_impl::g723_40_decode_bs_impl() diff --git a/gr-vocoder/lib/g723_40_encode_sb_impl.cc b/gr-vocoder/lib/g723_40_encode_sb_impl.cc index 5ca06289ac..29610fa463 100644 --- a/gr-vocoder/lib/g723_40_encode_sb_impl.cc +++ b/gr-vocoder/lib/g723_40_encode_sb_impl.cc @@ -21,7 +21,7 @@ namespace vocoder { g723_40_encode_sb::sptr g723_40_encode_sb::make() { - return gnuradio::get_initial_sptr(new g723_40_encode_sb_impl()); + return gnuradio::make_block_sptr<g723_40_encode_sb_impl>(); } g723_40_encode_sb_impl::g723_40_encode_sb_impl() diff --git a/gr-vocoder/lib/gsm_fr_decode_ps_impl.cc b/gr-vocoder/lib/gsm_fr_decode_ps_impl.cc index 25106f36ed..a86d0906fd 100644 --- a/gr-vocoder/lib/gsm_fr_decode_ps_impl.cc +++ b/gr-vocoder/lib/gsm_fr_decode_ps_impl.cc @@ -23,7 +23,7 @@ namespace vocoder { gsm_fr_decode_ps::sptr gsm_fr_decode_ps::make() { - return gnuradio::get_initial_sptr(new gsm_fr_decode_ps_impl()); + return gnuradio::make_block_sptr<gsm_fr_decode_ps_impl>(); } gsm_fr_decode_ps_impl::gsm_fr_decode_ps_impl() diff --git a/gr-vocoder/lib/gsm_fr_encode_sp_impl.cc b/gr-vocoder/lib/gsm_fr_encode_sp_impl.cc index 758718d6ce..c1446ed0bf 100644 --- a/gr-vocoder/lib/gsm_fr_encode_sp_impl.cc +++ b/gr-vocoder/lib/gsm_fr_encode_sp_impl.cc @@ -22,7 +22,7 @@ namespace vocoder { gsm_fr_encode_sp::sptr gsm_fr_encode_sp::make() { - return gnuradio::get_initial_sptr(new gsm_fr_encode_sp_impl()); + return gnuradio::make_block_sptr<gsm_fr_encode_sp_impl>(); } gsm_fr_encode_sp_impl::gsm_fr_encode_sp_impl() diff --git a/gr-vocoder/lib/ulaw_decode_bs_impl.cc b/gr-vocoder/lib/ulaw_decode_bs_impl.cc index 49b8cf3640..508b947571 100644 --- a/gr-vocoder/lib/ulaw_decode_bs_impl.cc +++ b/gr-vocoder/lib/ulaw_decode_bs_impl.cc @@ -25,7 +25,7 @@ extern "C" { ulaw_decode_bs::sptr ulaw_decode_bs::make() { - return gnuradio::get_initial_sptr(new ulaw_decode_bs_impl()); + return gnuradio::make_block_sptr<ulaw_decode_bs_impl>(); } ulaw_decode_bs_impl::ulaw_decode_bs_impl() diff --git a/gr-vocoder/lib/ulaw_encode_sb_impl.cc b/gr-vocoder/lib/ulaw_encode_sb_impl.cc index 33e96ee78c..e5b503abf8 100644 --- a/gr-vocoder/lib/ulaw_encode_sb_impl.cc +++ b/gr-vocoder/lib/ulaw_encode_sb_impl.cc @@ -25,7 +25,7 @@ extern "C" { ulaw_encode_sb::sptr ulaw_encode_sb::make() { - return gnuradio::get_initial_sptr(new ulaw_encode_sb_impl()); + return gnuradio::make_block_sptr<ulaw_encode_sb_impl>(); } ulaw_encode_sb_impl::ulaw_encode_sb_impl() |