Skip to content

Commit a8a843a

Browse files
authored
fix(simple_planning_simulator): fix bugprone-branch-clone (#9725)
* fix: bugprone-error Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> * fix: build error Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> --------- Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
1 parent 176e2e3 commit a8a843a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,7 @@ void SimplePlanningSimulator::set_input(const InputCommand & cmd, const double a
585585
std::visit(
586586
[this, acc_by_slope](auto && arg) {
587587
using T = std::decay_t<decltype(arg)>;
588-
if constexpr (std::is_same_v<T, Control>) {
589-
set_input(arg, acc_by_slope);
590-
} else if constexpr (std::is_same_v<T, ActuationCommandStamped>) {
588+
if constexpr (std::is_same_v<T, Control> || std::is_same_v<T, ActuationCommandStamped>) {
591589
set_input(arg, acc_by_slope);
592590
} else {
593591
throw std::invalid_argument("Invalid input command type");
@@ -640,7 +638,7 @@ void SimplePlanningSimulator::set_input(const Control & cmd, const double acc_by
640638
input << vel, steer;
641639
} else if ( // NOLINT
642640
vehicle_model_type_ == VehicleModelType::IDEAL_STEER_ACC ||
643-
vehicle_model_type_ == VehicleModelType::DELAY_STEER_ACC) {
641+
vehicle_model_type_ == VehicleModelType::DELAY_STEER_ACC) { // NOLINT
644642
input << combined_acc, steer;
645643
} else if ( // NOLINT
646644
vehicle_model_type_ == VehicleModelType::IDEAL_STEER_ACC_GEARED ||

0 commit comments

Comments
 (0)