diff options
author | Johannes Demel <demel@ant.uni-bremen.de> | 2020-05-09 15:14:37 +0200 |
---|---|---|
committer | Josh Morman <mormjb@gmail.com> | 2020-06-04 10:05:48 -0400 |
commit | 320aa710c42c884ec7395b5c8332f601ee1895fc (patch) | |
tree | a6e3568d1418d638fea596c2ad3296fa264c6335 /gr-fec | |
parent | d584e7e9be13b500a8bc9a85f37d1cd51b0e0be5 (diff) |
msg_handler: Use lambdas in most components
With this commit, all components except gr-qtgui use lambdas instead of
`boost::bind` to register msg handlers.
Diffstat (limited to 'gr-fec')
-rw-r--r-- | gr-fec/lib/async_decoder_impl.cc | 5 | ||||
-rw-r--r-- | gr-fec/lib/async_encoder_impl.cc | 5 | ||||
-rw-r--r-- | gr-fec/lib/depuncture_bb_impl.cc | 2 | ||||
-rw-r--r-- | gr-fec/lib/puncture_bb_impl.cc | 2 | ||||
-rw-r--r-- | gr-fec/lib/puncture_ff_impl.cc | 2 |
5 files changed, 7 insertions, 9 deletions
diff --git a/gr-fec/lib/async_decoder_impl.cc b/gr-fec/lib/async_decoder_impl.cc index 8848964f49..7188c23cc4 100644 --- a/gr-fec/lib/async_decoder_impl.cc +++ b/gr-fec/lib/async_decoder_impl.cc @@ -52,11 +52,10 @@ async_decoder_impl::async_decoder_impl(generic_decoder::sptr my_decoder, if (d_packed) { d_pack = new blocks::kernel::pack_k_bits(8); - set_msg_handler(d_in_port, - boost::bind(&async_decoder_impl::decode_packed, this, _1)); + set_msg_handler(d_in_port, [this](pmt::pmt_t msg) { this->decode_packed(msg); }); } else { set_msg_handler(d_in_port, - boost::bind(&async_decoder_impl::decode_unpacked, this, _1)); + [this](pmt::pmt_t msg) { this->decode_unpacked(msg); }); } // The maximum frame size is set by the initial frame size of the decoder. diff --git a/gr-fec/lib/async_encoder_impl.cc b/gr-fec/lib/async_encoder_impl.cc index 8cb0992d5d..e8d24ad331 100644 --- a/gr-fec/lib/async_encoder_impl.cc +++ b/gr-fec/lib/async_encoder_impl.cc @@ -51,8 +51,7 @@ async_encoder_impl::async_encoder_impl(generic_encoder::sptr my_encoder, message_port_register_out(d_out_port); if (d_packed) { - set_msg_handler(d_in_port, - boost::bind(&async_encoder_impl::encode_packed, this, _1)); + set_msg_handler(d_in_port, [this](pmt::pmt_t msg) { this->encode_packed(msg); }); d_unpack = new blocks::kernel::unpack_k_bits(8); @@ -62,7 +61,7 @@ async_encoder_impl::async_encoder_impl(generic_encoder::sptr my_encoder, } else { set_msg_handler(d_in_port, - boost::bind(&async_encoder_impl::encode_unpacked, this, _1)); + [this](pmt::pmt_t msg) { this->encode_unpacked(msg); }); } if (d_packed || (strncmp(d_encoder->get_input_conversion(), "pack", 4) == 0)) { diff --git a/gr-fec/lib/depuncture_bb_impl.cc b/gr-fec/lib/depuncture_bb_impl.cc index a6dc4fccfc..d5a765f2a2 100644 --- a/gr-fec/lib/depuncture_bb_impl.cc +++ b/gr-fec/lib/depuncture_bb_impl.cc @@ -66,7 +66,7 @@ depuncture_bb_impl::depuncture_bb_impl(int puncsize, set_fixed_rate(true); set_relative_rate((uint64_t)d_puncsize, (uint64_t)(d_puncsize - d_puncholes)); set_output_multiple(d_puncsize); - // set_msg_handler(boost::bind(&depuncture_bb_impl::catch_msg, this, _1)); + // set_msg_handler(<portname>, [this](pmt::pmt_t msg) { this->catch_msg(msg); }); } depuncture_bb_impl::~depuncture_bb_impl() {} diff --git a/gr-fec/lib/puncture_bb_impl.cc b/gr-fec/lib/puncture_bb_impl.cc index 54271b66f4..49f1bcfb55 100644 --- a/gr-fec/lib/puncture_bb_impl.cc +++ b/gr-fec/lib/puncture_bb_impl.cc @@ -60,7 +60,7 @@ puncture_bb_impl::puncture_bb_impl(int puncsize, int puncpat, int delay) set_fixed_rate(true); set_relative_rate((uint64_t)(d_puncsize - d_puncholes), (uint64_t)d_puncsize); set_output_multiple(d_puncsize - d_puncholes); - // set_msg_handler(boost::bind(&puncture_bb_impl::catch_msg, this, _1)); + // set_msg_handler(<portname>, [this](pmt::pmt_t msg) { this->catch_msg(msg); }); } puncture_bb_impl::~puncture_bb_impl() {} diff --git a/gr-fec/lib/puncture_ff_impl.cc b/gr-fec/lib/puncture_ff_impl.cc index a8f6c69b21..4b8c74f014 100644 --- a/gr-fec/lib/puncture_ff_impl.cc +++ b/gr-fec/lib/puncture_ff_impl.cc @@ -60,7 +60,7 @@ puncture_ff_impl::puncture_ff_impl(int puncsize, int puncpat, int delay) set_fixed_rate(true); set_relative_rate((uint64_t)(d_puncsize - d_puncholes), (uint64_t)d_puncsize); set_output_multiple(d_puncsize - d_puncholes); - // set_msg_handler(boost::bind(&puncture_ff_impl::catch_msg, this, _1)); + // set_msg_handler(<portname>, [this](pmt::pmt_t msg) { this->catch_msg(msg); }); } puncture_ff_impl::~puncture_ff_impl() {} |