From 7dcf07ecea5ac06a6b3f39cb707bb4dc3f43f09f Mon Sep 17 00:00:00 2001 From: Ryuta Kambe Date: Wed, 26 Jun 2024 11:36:28 +0900 Subject: [PATCH] fix(autoware_perception_rviz_plugin): fix duplicateBranch warnings Signed-off-by: Ryuta Kambe --- .../src/object_detection/object_polygon_detail.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/common/autoware_perception_rviz_plugin/src/object_detection/object_polygon_detail.cpp b/common/autoware_perception_rviz_plugin/src/object_detection/object_polygon_detail.cpp index 1d06454582a2f..a8b38ab232a01 100644 --- a/common/autoware_perception_rviz_plugin/src/object_detection/object_polygon_detail.cpp +++ b/common/autoware_perception_rviz_plugin/src/object_detection/object_polygon_detail.cpp @@ -526,10 +526,7 @@ visualization_msgs::msg::Marker::SharedPtr get_shape_marker_ptr( marker_ptr->scale = shape_msg.dimensions; marker_ptr->color.a = 0.75f; } - } else if (shape_msg.type == Shape::POLYGON) { - marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST; - calc_polygon_line_list(shape_msg, marker_ptr->points); - } else { + } else { // including shape_msg.type == Shape::POLYGON marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST; calc_polygon_line_list(shape_msg, marker_ptr->points); } @@ -562,10 +559,7 @@ visualization_msgs::msg::Marker::SharedPtr get_2d_shape_marker_ptr( } else if (shape_msg.type == Shape::CYLINDER) { marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST; calc_2d_cylinder_bottom_line_list(shape_msg, marker_ptr->points); - } else if (shape_msg.type == Shape::POLYGON) { - marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST; - calc_2d_polygon_bottom_line_list(shape_msg, marker_ptr->points); - } else { + } else { // including shape_msg.type == Shape::POLYGON marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST; calc_2d_polygon_bottom_line_list(shape_msg, marker_ptr->points); }