From bf422ee8ad0dfcb2a9d10f637aabb1805df955ac Mon Sep 17 00:00:00 2001 From: kobayu858 Date: Tue, 17 Dec 2024 13:47:37 +0900 Subject: [PATCH 1/3] fix: bugprone-error Signed-off-by: kobayu858 --- .../src/objects_of_interest_marker_interface.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp b/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp index cbdb2542b97e7..61a4891ad0f6f 100644 --- a/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp +++ b/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp @@ -83,7 +83,6 @@ ColorRGBA ObjectsOfInterestMarkerInterface::getColor( case ColorName::RED: return coloring::getRed(alpha); case ColorName::GRAY: - return coloring::getGray(alpha); default: return coloring::getGray(alpha); } From f78ab3dc58f464890c0a5f5bf7f565e6a083d817 Mon Sep 17 00:00:00 2001 From: kobayu858 Date: Tue, 17 Dec 2024 14:11:39 +0900 Subject: [PATCH 2/3] fix: bugprone-error Signed-off-by: kobayu858 --- .../src/objects_of_interest_marker_interface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp b/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp index 61a4891ad0f6f..4fd3cea10ae44 100644 --- a/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp +++ b/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp @@ -82,7 +82,8 @@ ColorRGBA ObjectsOfInterestMarkerInterface::getColor( return coloring::getAmber(alpha); case ColorName::RED: return coloring::getRed(alpha); - case ColorName::GRAY: + case ColorName::GRAY: // NOLINT + return coloring::getGray(alpha); default: return coloring::getGray(alpha); } From dc9b19dc1ff393682cfc75ff733fb9ee55caa583 Mon Sep 17 00:00:00 2001 From: kobayu858 Date: Wed, 25 Dec 2024 14:26:50 +0900 Subject: [PATCH 3/3] refactor: switch case Signed-off-by: kobayu858 --- .../src/objects_of_interest_marker_interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp b/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp index 4fd3cea10ae44..e18190a8bf9e7 100644 --- a/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp +++ b/planning/autoware_objects_of_interest_marker_interface/src/objects_of_interest_marker_interface.cpp @@ -76,14 +76,14 @@ ColorRGBA ObjectsOfInterestMarkerInterface::getColor( const ColorName & color_name, const float alpha) { switch (color_name) { + case ColorName::GRAY: + return coloring::getGray(alpha); case ColorName::GREEN: return coloring::getGreen(alpha); case ColorName::AMBER: return coloring::getAmber(alpha); case ColorName::RED: return coloring::getRed(alpha); - case ColorName::GRAY: // NOLINT - return coloring::getGray(alpha); default: return coloring::getGray(alpha); }