mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
clang-tidy: modernize-pass-by-value
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <hal/Types.h>
|
||||
@@ -102,7 +103,7 @@ class TimedRobot : public IterativeRobotBase, public ErrorBase {
|
||||
*/
|
||||
Callback(std::function<void()> func, units::second_t startTime,
|
||||
units::second_t period, units::second_t offset)
|
||||
: func{func},
|
||||
: func{std::move(func)},
|
||||
period{period},
|
||||
expirationTime{
|
||||
startTime + offset +
|
||||
|
||||
@@ -41,9 +41,8 @@ class HolonomicDriveController {
|
||||
* angle.
|
||||
*/
|
||||
HolonomicDriveController(
|
||||
const frc2::PIDController& xController,
|
||||
const frc2::PIDController& yController,
|
||||
const ProfiledPIDController<units::radian>& thetaController);
|
||||
frc2::PIDController xController, frc2::PIDController yController,
|
||||
ProfiledPIDController<units::radian> thetaController);
|
||||
|
||||
/**
|
||||
* Returns true if the pose error is within tolerance of the reference.
|
||||
|
||||
@@ -41,7 +41,7 @@ class DifferentialDrivetrainSim {
|
||||
* starting point.
|
||||
*/
|
||||
DifferentialDrivetrainSim(
|
||||
const LinearSystem<2, 2, 2>& plant, units::meter_t trackWidth,
|
||||
LinearSystem<2, 2, 2> plant, units::meter_t trackWidth,
|
||||
DCMotor driveMotor, double gearingRatio, units::meter_t wheelRadius,
|
||||
const std::array<double, 7>& measurementStdDevs = {});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user