summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib
diff options
context:
space:
mode:
authorJohannes Demel <demel@ant.uni-bremen.de>2020-05-09 14:25:32 +0200
committerJosh Morman <mormjb@gmail.com>2020-06-04 10:05:48 -0400
commitd584e7e9be13b500a8bc9a85f37d1cd51b0e0be5 (patch)
tree9e30cecfdeed04cb32263f7b9509291e0d6fbf40 /gnuradio-runtime/lib
parenta6a1954f83478aff0c4fc53d0e8f51b49d51cc1e (diff)
msg_handler: Use lambdas to set msg handlers
With this commit, all calls to `set_msg_handler` in `gr-blocks` use lambdas. This helps to use `std::function` instead of `boost::function`.
Diffstat (limited to 'gnuradio-runtime/lib')
-rw-r--r--gnuradio-runtime/lib/block.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/block.cc b/gnuradio-runtime/lib/block.cc
index b10ae97072..b6137f7a51 100644
--- a/gnuradio-runtime/lib/block.cc
+++ b/gnuradio-runtime/lib/block.cc
@@ -49,8 +49,7 @@ block::block(const std::string& name,
{
global_block_registry.register_primitive(alias(), this);
message_port_register_in(d_system_port);
- set_msg_handler(d_system_port,
- std::bind(&block::system_handler, this, std::placeholders::_1));
+ set_msg_handler(d_system_port, [this](pmt::pmt_t msg) { this->system_handler(msg); });
}
block::~block() { global_block_registry.unregister_primitive(symbol_name()); }