Skip to content

Commit

Permalink
Fix ChoreoSwerveCommand C++ constructor copy warnings (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacey-sooty authored Apr 23, 2024
1 parent 44d1e43 commit 4de6fb8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions choreolib/src/main/native/cpp/choreo/lib/ChoreoSwerveCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@

#include <frc/DriverStation.h>

#include <utility>

using namespace choreolib;

ChoreoSwerveCommand::ChoreoSwerveCommand(
ChoreoTrajectory trajectory, std::function<frc::Pose2d()> poseSupplier,
ChoreoControllerFunction controller,
std::function<void(frc::ChassisSpeeds)> outputChassisSpeeds,
std::function<bool(void)> mirrorTrajectory, frc2::Requirements requirements)
: m_traj(trajectory),
m_pose(poseSupplier),
m_controller(controller),
m_outputChassisSpeeds(outputChassisSpeeds),
m_mirrorTrajectory(mirrorTrajectory) {
: m_traj(std::move(trajectory)),
m_pose(std::move(poseSupplier)),
m_controller(std::move(controller)),
m_outputChassisSpeeds(std::move(outputChassisSpeeds)),
m_mirrorTrajectory(std::move(mirrorTrajectory)) {
AddRequirements(requirements);
}

Expand Down

0 comments on commit 4de6fb8

Please sign in to comment.