From d584e7e9be13b500a8bc9a85f37d1cd51b0e0be5 Mon Sep 17 00:00:00 2001
From: Johannes Demel <demel@ant.uni-bremen.de>
Date: Sat, 9 May 2020 14:25:32 +0200
Subject: 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`.
---
 gr-blocks/lib/message_strobe_random_impl.cc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'gr-blocks/lib/message_strobe_random_impl.cc')

diff --git a/gr-blocks/lib/message_strobe_random_impl.cc b/gr-blocks/lib/message_strobe_random_impl.cc
index 1241d1c382..1c2b4ec2a1 100644
--- a/gr-blocks/lib/message_strobe_random_impl.cc
+++ b/gr-blocks/lib/message_strobe_random_impl.cc
@@ -54,9 +54,7 @@ message_strobe_random_impl::message_strobe_random_impl(
         new gr::thread::thread(std::bind(&message_strobe_random_impl::run, this)));
 
     message_port_register_in(pmt::mp("set_msg"));
-    set_msg_handler(
-        pmt::mp("set_msg"),
-        std::bind(&message_strobe_random_impl::set_msg, this, std::placeholders::_1));
+    set_msg_handler(pmt::mp("set_msg"), [this](pmt::pmt_t msg) { this->set_msg(msg); });
 }
 
 void message_strobe_random_impl::set_mean(float mean_ms)
-- 
cgit v1.2.3