From 331542c178402469c7516e2abcffc5e458837c67 Mon Sep 17 00:00:00 2001 From: Takayuki Murooka Date: Wed, 22 Feb 2023 10:41:27 +0900 Subject: [PATCH] fix Signed-off-by: Takayuki Murooka --- .../src/scene_module/avoidance/avoidance_utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_utils.cpp b/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_utils.cpp index 889a40e0b2c4d..78b9dd3b77a2b 100644 --- a/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_utils.cpp +++ b/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_utils.cpp @@ -321,8 +321,8 @@ std::vector generatePolygonInsideBounds( const bool is_object_right) { std::vector full_polygon; - for (size_t i = 0; i < edge_points.size(); ++i) { - const auto polygon_point = transformBoundFrenetCoordinate(bound, edge_points.at(i)); + for (const auto & edge_point : edge_points) { + const auto polygon_point = transformBoundFrenetCoordinate(bound, edge_point); full_polygon.push_back(polygon_point); } @@ -366,7 +366,7 @@ std::vector generatePolygonInsideBounds( return inside_poly; } -std::vector convertToPoints( +std::vector convertToGeometryPoints( const std::vector & polygon_points) { std::vector points; @@ -555,7 +555,7 @@ std::vector updateBoundary( updated_bound.erase( updated_bound.begin() + removed_start_idx, updated_bound.begin() + removed_end_idx + 1); - const auto obj_points = convertToPoints(polygon); + const auto obj_points = convertToGeometryPoints(polygon); updated_bound.insert( updated_bound.begin() + removed_start_idx, obj_points.begin(), obj_points.end()); }