Skip to content

Commit ee0cb1f

Browse files
committed
auto lambda for c++14
1 parent 720b6a9 commit ee0cb1f

12 files changed

+23
-23
lines changed

jsk_topic_tools/include/jsk_topic_tools/connection_based_nodelet.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ namespace jsk_topic_tools
192192
{
193193
boost::mutex::scoped_lock lock(connection_mutex_);
194194
ros::SubscriberStatusCallback connect_cb
195-
#if __cplusplus < 201100L
195+
#if __cplusplus < 201400L
196196
= boost::bind(&ConnectionBasedNodelet::connectionCallback, this, _1);
197197
#else
198198
= [this](auto& pub){ connectionCallback(pub); };
199199
#endif
200200
ros::SubscriberStatusCallback disconnect_cb
201-
#if __cplusplus < 201100L
201+
#if __cplusplus < 201400L
202202
= boost::bind(&ConnectionBasedNodelet::connectionCallback, this, _1);
203203
#else
204204
= [this](auto& pub){ connectionCallback(pub); };
@@ -262,14 +262,14 @@ namespace jsk_topic_tools
262262
{
263263
boost::mutex::scoped_lock lock(connection_mutex_);
264264
image_transport::SubscriberStatusCallback connect_cb
265-
#if __cplusplus < 201100L
265+
#if __cplusplus < 201400L
266266
= boost::bind(&ConnectionBasedNodelet::imageConnectionCallback,
267267
this, _1);
268268
#else
269269
= [this](auto& pub){ imageConnectionCallback(pub); };
270270
#endif
271271
image_transport::SubscriberStatusCallback disconnect_cb
272-
#if __cplusplus < 201100L
272+
#if __cplusplus < 201400L
273273
= boost::bind(&ConnectionBasedNodelet::imageConnectionCallback,
274274
this, _1);
275275
#else
@@ -334,28 +334,28 @@ namespace jsk_topic_tools
334334
{
335335
boost::mutex::scoped_lock lock(connection_mutex_);
336336
image_transport::SubscriberStatusCallback connect_cb
337-
#if __cplusplus < 201100L
337+
#if __cplusplus < 201400L
338338
= boost::bind(&ConnectionBasedNodelet::cameraConnectionCallback,
339339
this, _1);
340340
#else
341341
= [this](auto& pub){ cameraConnectionCallback(pub); };
342342
#endif
343343
image_transport::SubscriberStatusCallback disconnect_cb
344-
#if __cplusplus < 201100L
344+
#if __cplusplus < 201400L
345345
= boost::bind(&ConnectionBasedNodelet::cameraConnectionCallback,
346346
this, _1);
347347
#else
348348
= [this](auto& pub){ cameraConnectionCallback(pub); };
349349
#endif
350350
ros::SubscriberStatusCallback info_connect_cb
351-
#if __cplusplus < 201100L
351+
#if __cplusplus < 201400L
352352
= boost::bind(&ConnectionBasedNodelet::cameraInfoConnectionCallback,
353353
this, _1);
354354
#else
355355
= [this](auto& pub){ cameraInfoConnectionCallback(pub); };
356356
#endif
357357
ros::SubscriberStatusCallback info_disconnect_cb
358-
#if __cplusplus < 201100L
358+
#if __cplusplus < 201400L
359359
= boost::bind(&ConnectionBasedNodelet::cameraInfoConnectionCallback,
360360
this, _1);
361361
#else

jsk_topic_tools/src/constant_rate_throttle_nodelet.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace jsk_topic_tools
1212

1313
srv_ = boost::make_shared<dynamic_reconfigure::Server<Config> >(pnh_);
1414
dynamic_reconfigure::Server<Config>::CallbackType f
15-
#if __cplusplus < 201100L
15+
#if __cplusplus < 201400L
1616
= boost::bind(&ConstantRateThrottle::configCallback, this, _1, _2);
1717
#else
1818
= [this](auto& config, auto level) {configCallback(config, level); };
@@ -68,7 +68,7 @@ namespace jsk_topic_tools
6868
if (!advertised_) {
6969
sub_->shutdown();
7070
ros::SubscriberStatusCallback connect_cb
71-
#if __cplusplus < 201100L
71+
#if __cplusplus < 201400L
7272
= boost::bind(&ConstantRateThrottle::connectionCallback, this, _1);
7373
#else
7474
= [this](auto& pub){ connectionCallback(pub); };

jsk_topic_tools/src/diagnostic_nodelet.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace jsk_topic_tools
5656
diagnostic_updater_->setHardwareID(getName());
5757
diagnostic_updater_->add(
5858
getName(),
59-
#if __cplusplus < 201100L
59+
#if __cplusplus < 201400L
6060
boost::bind(
6161
&DiagnosticNodelet::updateDiagnostic,
6262
this,

jsk_topic_tools/src/hz_measure_nodelet.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ namespace jsk_topic_tools
7878

7979
diagnostic_updater_.reset(new TimeredDiagnosticUpdater(pnh_, ros::Duration(1.0)));
8080
diagnostic_updater_->setHardwareID(getName());
81-
#if __cplusplus < 201100L
81+
#if __cplusplus < 201400L
8282
diagnostic_updater_->add(getName(),
8383
boost::bind(&HzMeasure::updateDiagnostic,
8484
this, _1));

jsk_topic_tools/src/lightweight_throttle_nodelet.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace jsk_topic_tools
4545

4646
srv_ = boost::make_shared<dynamic_reconfigure::Server<Config> >(pnh_);
4747
dynamic_reconfigure::Server<Config>::CallbackType f =
48-
#if __cplusplus < 201100L
48+
#if __cplusplus < 201400L
4949
boost::bind(&LightweightThrottle::configCallback, this, _1, _2);
5050
#else
5151
[this](auto& config, auto level){ configCallback(config, level); };
@@ -99,7 +99,7 @@ namespace jsk_topic_tools
9999
// This section should be called once
100100
sub_->shutdown(); // Shutdown before advertising topic
101101
ros::SubscriberStatusCallback connect_cb
102-
#if __cplusplus < 201100L
102+
#if __cplusplus < 201400L
103103
= boost::bind(&LightweightThrottle::connectionCallback, this, _1);
104104
#else
105105
= [this](auto& pub){ connectionCallback(pub); };

jsk_topic_tools/src/mux_nodelet.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ namespace jsk_topic_tools
194194
{
195195
if (!advertised_) { // first time
196196
ros::SubscriberStatusCallback connect_cb
197-
#if __cplusplus < 201100L
197+
#if __cplusplus < 201400L
198198
= boost::bind(&MUX::connectCb, this, _1);
199199
#else
200200
= [this](auto& pub){ connectCb(pub); };

jsk_topic_tools/src/relay_nodelet.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace jsk_topic_tools
5050
diagnostic_updater_->setHardwareID(getName());
5151
diagnostic_updater_->add(
5252
getName() + "::Relay",
53-
#if __cplusplus < 201100L
53+
#if __cplusplus < 201400L
5454
boost::bind(
5555
&Relay::updateDiagnostic, this, _1));
5656
#else

jsk_topic_tools/src/stealth_relay_nodelet.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ namespace jsk_topic_tools
6969

7070
srv_ = boost::make_shared<dynamic_reconfigure::Server<Config> >(*pnh_);
7171
dynamic_reconfigure::Server<Config>::CallbackType f =
72-
#if __cplusplus < 201100L
72+
#if __cplusplus < 201400L
7373
boost::bind(&StealthRelay::configCallback, this, _1, _2);
7474
#else
7575
[this](auto& config, auto level){ configCallback(config, level); };

jsk_topic_tools/src/synchronized_throttle_nodelet.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void SynchronizedThrottle::onInit()
8787

8888
srv_ = boost::make_shared<dynamic_reconfigure::Server<Config> >(*pnh_);
8989
dynamic_reconfigure::Server<Config>::CallbackType f =
90-
#if __cplusplus < 201100L
90+
#if __cplusplus < 201400L
9191
boost::bind(&SynchronizedThrottle::configCallback, this, _1, _2);
9292
#else
9393
[this](auto& config, auto level){ configCallback(config, level); };
@@ -114,7 +114,7 @@ void SynchronizedThrottle::onInit()
114114
{
115115
check_sub_[i] = pnh_->subscribe<topic_tools::ShapeShifterStamped>(
116116
input_topics_[i], 1,
117-
#if __cplusplus < 201100L
117+
#if __cplusplus < 201400L
118118
boost::bind(&SynchronizedThrottle::checkCallback, this, _1, i)
119119
#else
120120
[this,i](auto& msg){ checkCallback(msg, i); }
@@ -208,7 +208,7 @@ void SynchronizedThrottle::subscribe()
208208
if (n_topics < MAX_SYNC_NUM)
209209
{
210210
sub_[0]->registerCallback(
211-
#if __cplusplus < 201100L
211+
#if __cplusplus < 201400L
212212
boost::bind(&SynchronizedThrottle::fillNullMessage, this, _1)
213213
#else
214214
[this](auto& msg){ fillNullMessage(msg); }

jsk_topic_tools/src/timered_diagnostic_updater.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace jsk_topic_tools
4444
{
4545
timer_ = nh.createTimer(
4646
timer_duration,
47-
#if __cplusplus < 201100L
47+
#if __cplusplus < 201400L
4848
boost::bind(&TimeredDiagnosticUpdater::timerCallback,this,_1)
4949
#else
5050
[this](auto& event){ timerCallback(event); }

jsk_topic_tools/src/topic_buffer_client.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ int main(int argc, char **argv)
201201
pub_info->topic_with_header = false;
202202
ROS_INFO_STREAM("subscribe " << pub_info->topic_name+string("_update"));
203203
pub_info->sub = new ros::Subscriber(n.subscribe<ShapeShifter>(pub_info->topic_name+string("_update"), 10,
204-
#if __cplusplus < 201100L
204+
#if __cplusplus < 201400L
205205
boost::bind(in_cb, _1, pub_info)
206206
#else
207207
[pub_info](auto& msg){ in_cb(msg, pub_info); }

jsk_topic_tools/src/topic_buffer_server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ int main(int argc, char **argv)
220220
sub_info->periodic = false;
221221
ROS_INFO_STREAM("subscribe " << sub_info->topic_name);
222222
sub_info->sub = new ros::Subscriber(n.subscribe<ShapeShifter>(sub_info->topic_name, 10,
223-
#if __cplusplus < 201100L
223+
#if __cplusplus < 201400L
224224
boost::bind(in_cb, _1, sub_info)
225225
#else
226226
[sub_info](auto& msg){ in_cb(msg, sub_info); }

0 commit comments

Comments
 (0)