From b9ad9bb4b8d865da05df0e085209eabb4910d2be Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Fri, 19 May 2017 12:16:14 +0200 Subject: [PATCH] Remove unnecessary if. (#347) --- .../cartographer_ros/offline_node_main.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cartographer_ros/cartographer_ros/offline_node_main.cc b/cartographer_ros/cartographer_ros/offline_node_main.cc index 22be323..12e933a 100644 --- a/cartographer_ros/cartographer_ros/offline_node_main.cc +++ b/cartographer_ros/cartographer_ros/offline_node_main.cc @@ -183,14 +183,12 @@ void Run(const std::vector& bag_filenames) { auto tf_message = msg.instantiate(); tf_publisher.publish(tf_message); - if (FLAGS_use_bag_transforms) { - for (const auto& transform : tf_message->transforms) { - try { - tf_buffer.setTransform(transform, "unused_authority", - msg.getTopic() == kTfStaticTopic); - } catch (const tf2::TransformException& ex) { - LOG(WARNING) << ex.what(); - } + for (const auto& transform : tf_message->transforms) { + try { + tf_buffer.setTransform(transform, "unused_authority", + msg.getTopic() == kTfStaticTopic); + } catch (const tf2::TransformException& ex) { + LOG(WARNING) << ex.what(); } } }