Remove unnecessary if. (#347)

master
Holger Rapp 2017-05-19 12:16:14 +02:00 committed by GitHub
parent 841b17f393
commit b9ad9bb4b8
1 changed files with 6 additions and 8 deletions

View File

@ -183,14 +183,12 @@ void Run(const std::vector<string>& bag_filenames) {
auto tf_message = msg.instantiate<tf2_msgs::TFMessage>();
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();
}
}
}