Skip to content

Commit 82137b2

Browse files
fix cpp-check error
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
1 parent 7628561 commit 82137b2

File tree

1 file changed

+3
-4
lines changed
  • planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/utils

1 file changed

+3
-4
lines changed

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/utils/markers.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,11 @@ MarkerArray showAllValidLaneChangePath(
7979
if (lc_path.path.points.empty()) {
8080
continue;
8181
}
82-
std::ostringstream ss;
83-
ss << ns.c_str() << "[" << idx << "]";
82+
std::string ns_with_idx = ns + "[" + std::to_string(idx) + "]";
8483
const auto & color = colors.at(idx);
8584
const auto & points = lc_path.path.points;
8685
auto marker = createDefaultMarker(
87-
"map", current_time, ss.str(), ++id, Marker::LINE_STRIP, createMarkerScale(0.1, 0.1, 0.0),
86+
"map", current_time, ns_with_idx, ++id, Marker::LINE_STRIP, createMarkerScale(0.1, 0.1, 0.0),
8887
color);
8988
marker.points.reserve(points.size());
9089

@@ -93,7 +92,7 @@ MarkerArray showAllValidLaneChangePath(
9392
}
9493

9594
auto text_marker = createDefaultMarker(
96-
"map", current_time, ss.str(), ++id, visualization_msgs::msg::Marker::TEXT_VIEW_FACING,
95+
"map", current_time, ns_with_idx, ++id, visualization_msgs::msg::Marker::TEXT_VIEW_FACING,
9796
createMarkerScale(0.1, 0.1, 0.8), colors::yellow());
9897
const auto prep_idx = points.size() / 4;
9998
text_marker.pose = points.at(prep_idx).point.pose;

0 commit comments

Comments
 (0)