Skip to content

Commit 760f23d

Browse files
committed
fix formatting
1 parent 72a3bf5 commit 760f23d

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

behaviortree_ros2/src/bt_ros_logger.cpp

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,35 @@
33
namespace BT
44
{
55

6-
RosLogger::RosLogger(const BT::Tree& tree, std::shared_ptr<rclcpp::Node> node) : StatusChangeLogger(tree.rootNode()), node_(node)
6+
RosLogger::RosLogger(const BT::Tree& tree, std::shared_ptr<rclcpp::Node> node)
7+
: StatusChangeLogger(tree.rootNode()), node_(node)
78
{}
89
RosLogger::~RosLogger()
910
{}
1011

11-
void RosLogger::callback(Duration timestamp, const TreeNode& node,
12-
NodeStatus prev_status, NodeStatus status)
12+
void RosLogger::callback(Duration timestamp, const TreeNode& node, NodeStatus prev_status,
13+
NodeStatus status)
1314
{
1415
using namespace std::chrono;
1516

1617
// get ros node pointer
1718
auto ros_node = node_.lock();
1819

19-
if (ros_node) {
20-
20+
if(ros_node)
21+
{
2122
constexpr const char* whitespaces = " ";
2223
constexpr const size_t ws_count = 25;
2324

2425
double since_epoch = duration<double>(timestamp).count();
2526

26-
RCLCPP_DEBUG(
27-
ros_node->get_logger(), "[%.3f]: %s%s %s -> %s",
28-
since_epoch, node.name().c_str(),
29-
&whitespaces[std::min(ws_count, node.name().size())],
30-
toStr(prev_status, true).c_str(), toStr(status, true).c_str());
27+
RCLCPP_DEBUG(ros_node->get_logger(), "[%.3f]: %s%s %s -> %s", since_epoch,
28+
node.name().c_str(),
29+
&whitespaces[std::min(ws_count, node.name().size())],
30+
toStr(prev_status, true).c_str(), toStr(status, true).c_str());
3131
}
3232
}
3333

3434
void RosLogger::flush()
35-
{
36-
}
35+
{}
3736

38-
} // namespace BT
37+
} // namespace BT

0 commit comments

Comments
 (0)