Skip to content

Commit

Permalink
fix(autoware_perception_rviz_plugin): fix duplicateBranch warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Ryuta Kambe <[email protected]>
  • Loading branch information
veqcc committed Jun 26, 2024
1 parent b67a6c3 commit 7dcf07e
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check notice on line 529 in common/autoware_perception_rviz_plugin/src/object_detection/object_polygon_detail.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Complex Method

get_shape_marker_ptr is no longer above the threshold for cyclomatic complexity
marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST;
calc_polygon_line_list(shape_msg, marker_ptr->points);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 7dcf07e

Please sign in to comment.