From 946d1203cfbbe522c61d6ed5dc1205c9f809f6f1 Mon Sep 17 00:00:00 2001 From: Thomas Gubler Date: Fri, 28 Nov 2014 09:45:39 +0100 Subject: [PATCH] remove unnecessary variable --- src/examples/subscriber/subscriber.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/examples/subscriber/subscriber.cpp b/src/examples/subscriber/subscriber.cpp index f8b1388443..178fca4b5e 100644 --- a/src/examples/subscriber/subscriber.cpp +++ b/src/examples/subscriber/subscriber.cpp @@ -84,8 +84,10 @@ PX4_MAIN_FUNCTION(subscriber) // n.subscribe(PX4_TOPIC(rc_channels), [&](const PX4_TOPIC_T(rc_channels) &msg){rc_channels_callback(msg);}); // n.subscribe(PX4_TOPIC(rc_channels), [&](int i){ return rc_channels_callback(i);}); // CallbackFunction cbf = [](int i){ return rc_channels_callback(i);}; - std::function cbf = [](const PX4_TOPIC_T(rc_channels)& msg){ return rc_channels_callback(msg);}; - n.subscribe(PX4_TOPIC(rc_channels), cbf); + // std::function cbf = [](const PX4_TOPIC_T(rc_channels)& msg){ return rc_channels_callback(msg);}; + // n.subscribe(PX4_TOPIC(rc_channels), cbf); + n.subscribe(PX4_TOPIC(rc_channels), + [](const PX4_TOPIC_T(rc_channels)& msg){ return rc_channels_callback(msg);}); PX4_INFO("subscribed"); /**