summaryrefslogtreecommitdiff
path: root/gr-digital/lib/interpolating_resampler.h
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2020-08-12 11:11:11 +0100
committerMartin Braun <martin@gnuradio.org>2020-08-14 04:08:48 -0700
commitc85820204393722564a7d697cbd77b4f5aa09bea (patch)
tree55c5044aecd973ae5726dfd63d8fa35035cbdc86 /gr-digital/lib/interpolating_resampler.h
parentb5fb4c2eb54164ab57750878fd185b8170823711 (diff)
digital/symbol_sync: Remove manual memory management
The `cc` version already used more smart pointers, but `d_clock` didn't need to be a pointer at all. I consted function args to make it clear in the initializer that they will not be changed in the constructor body. Return value for `make` for the TED and interpolator was changed to a `unique_ptr` to make it clear that ownership is transferred. And it makes it all but impossible to accidentally memory leak. (core guidelines F.26. Also relevant I.11,R.20).
Diffstat (limited to 'gr-digital/lib/interpolating_resampler.h')
-rw-r--r--gr-digital/lib/interpolating_resampler.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gr-digital/lib/interpolating_resampler.h b/gr-digital/lib/interpolating_resampler.h
index 2c64667ebc..439b46ac3b 100644
--- a/gr-digital/lib/interpolating_resampler.h
+++ b/gr-digital/lib/interpolating_resampler.h
@@ -160,7 +160,7 @@ public:
* \param taps Prototype filter for the polyphase filter bank. Only
* needed for some types.
*/
- static interpolating_resampler_ccf*
+ static std::unique_ptr<interpolating_resampler_ccf>
make(enum ir_type type,
bool derivative = false,
int nfilts = 32,
@@ -222,7 +222,7 @@ public:
* \param taps Prototype filter for the polyphase filter bank. Only
* needed for some types.
*/
- static interpolating_resampler_fff*
+ static std::unique_ptr<interpolating_resampler_fff>
make(enum ir_type type,
bool derivative = false,
int nfilts = 32,