1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Mon, 14 Dec 2020 14:30:15 +0100
Subject: Switch to new boost/bind/bind.hpp
---
diagnostic_updater/include/diagnostic_updater/diagnostic_updater.h | 4 ++--
diagnostic_updater/src/example.cpp | 4 ++--
self_test/include/self_test/self_test.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/diagnostic_updater/include/diagnostic_updater/diagnostic_updater.h b/diagnostic_updater/include/diagnostic_updater/diagnostic_updater.h
index b3de37c..fccb8b0 100644
--- a/diagnostic_updater/include/diagnostic_updater/diagnostic_updater.h
+++ b/diagnostic_updater/include/diagnostic_updater/diagnostic_updater.h
@@ -270,7 +270,7 @@ namespace diagnostic_updater
void add(DiagnosticTask &task)
{
- TaskFunction f = boost::bind(&DiagnosticTask::run, &task, _1);
+ TaskFunction f = boost::bind(&DiagnosticTask::run, &task, boost::placeholders::_1);
add(task.getName(), f);
}
@@ -290,7 +290,7 @@ namespace diagnostic_updater
template <class T>
void add(const std::string name, T *c, void (T::*f)(diagnostic_updater::DiagnosticStatusWrapper&))
{
- DiagnosticTaskInternal int_task(name, boost::bind(f, c, _1));
+ DiagnosticTaskInternal int_task(name, boost::bind(f, c, boost::placeholders::_1));
addInternal(int_task);
}
diff --git a/diagnostic_updater/src/example.cpp b/diagnostic_updater/src/example.cpp
index 8446669..19f096e 100644
--- a/diagnostic_updater/src/example.cpp
+++ b/diagnostic_updater/src/example.cpp
@@ -160,9 +160,9 @@ int main(int argc, char **argv)
// a function. This will be useful when combining multiple diagnostic
// tasks using a CompositeDiagnosticTask.
diagnostic_updater::FunctionDiagnosticTask lower("Lower-bound check",
- boost::bind(&check_lower_bound, _1));
+ boost::bind(&check_lower_bound, boost::placeholders::_1));
diagnostic_updater::FunctionDiagnosticTask upper("Upper-bound check",
- boost::bind(&check_upper_bound, _1));
+ boost::bind(&check_upper_bound, boost::placeholders::_1));
// If you want to merge the outputs of two diagnostic tasks together, you
// can create a CompositeDiagnosticTask, also a derived class from
diff --git a/self_test/include/self_test/self_test.h b/self_test/include/self_test/self_test.h
index 652c10c..411f282 100644
--- a/self_test/include/self_test/self_test.h
+++ b/self_test/include/self_test/self_test.h
@@ -93,7 +93,7 @@ namespace self_test
{
ROS_DEBUG("Advertising self_test");
ros::AdvertiseServiceOptions ops;//use options so that we can set callback queue directly
- ops.init<diagnostic_msgs::SelfTest::Request, diagnostic_msgs::SelfTest::Response>("self_test", boost::bind(&TestRunner::doTest, this, _1, _2));
+ ops.init<diagnostic_msgs::SelfTest::Request, diagnostic_msgs::SelfTest::Response>("self_test", boost::bind(&TestRunner::doTest, this, boost::placeholders::_1, boost::placeholders::_2));
ops.callback_queue = &self_test_queue_;
service_server_ = private_node_handle_.advertiseService(ops);
verbose = true;
|