summaryrefslogtreecommitdiff
path: root/gr-digital/lib/timing_error_detector.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/timing_error_detector.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/timing_error_detector.h')
-rw-r--r--gr-digital/lib/timing_error_detector.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gr-digital/lib/timing_error_detector.h b/gr-digital/lib/timing_error_detector.h
index e6de47697b..439be37b78 100644
--- a/gr-digital/lib/timing_error_detector.h
+++ b/gr-digital/lib/timing_error_detector.h
@@ -50,7 +50,7 @@ public:
* for decision directed timing error detector
* algorithms
*/
- static timing_error_detector*
+ static std::unique_ptr<timing_error_detector>
make(enum ted_type type, constellation_sptr constellation = constellation_sptr());
virtual ~timing_error_detector(){};