Skip to content

Commit d88ef14

Browse files
fixed on_set_chained_mode implementations to avoid cpplint warnings
1 parent 0fb4fc6 commit d88ef14

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

diff_drive_controller/src/diff_drive_controller.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,9 @@ controller_interface::CallbackReturn DiffDriveController::configure_side(
689689

690690
bool DiffDriveController::on_set_chained_mode(bool chained_mode)
691691
{
692-
// Always accept switch to/from chained mode (without linting type-cast error)
693-
return true || chained_mode;
692+
// Fix to adhere to CppLint standards
693+
(void)chained_mode
694+
return true;
694695
}
695696

696697
std::vector<hardware_interface::CommandInterface>

mecanum_drive_controller/src/mecanum_drive_controller.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,9 @@ MecanumDriveController::on_export_reference_interfaces()
293293

294294
bool MecanumDriveController::on_set_chained_mode(bool chained_mode)
295295
{
296-
// Always accept switch to/from chained mode
297-
return true || chained_mode;
296+
// Fix to adhere to CppLint standards
297+
(void)chained_mode
298+
return true;
298299
}
299300

300301
controller_interface::CallbackReturn MecanumDriveController::on_activate(

pid_controller/src/pid_controller.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,9 @@ std::vector<hardware_interface::StateInterface> PidController::on_export_state_i
425425

426426
bool PidController::on_set_chained_mode(bool chained_mode)
427427
{
428-
// Always accept switch to/from chained mode
429-
return true || chained_mode;
428+
// Fix to adhere to CppLint standards
429+
(void)chained_mode
430+
return true;
430431
}
431432

432433
controller_interface::CallbackReturn PidController::on_activate(

steering_controllers_library/src/steering_controllers_library.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,9 @@ SteeringControllersLibrary::on_export_reference_interfaces()
329329

330330
bool SteeringControllersLibrary::on_set_chained_mode(bool chained_mode)
331331
{
332-
// Always accept switch to/from chained mode
333-
return true || chained_mode;
332+
// Fix to adhere to CppLint standards
333+
(void)chained_mode
334+
return true;
334335
}
335336

336337
controller_interface::CallbackReturn SteeringControllersLibrary::on_activate(

0 commit comments

Comments
 (0)