mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilibc] Add missing move constructors and assignment operators (#2959)
- Field2d - FieldObject2d - AnalogGyro
This commit is contained in:
@@ -9,6 +9,20 @@
|
||||
|
||||
using namespace frc;
|
||||
|
||||
FieldObject2d::FieldObject2d(FieldObject2d&& rhs) {
|
||||
std::swap(m_name, rhs.m_name);
|
||||
std::swap(m_entry, rhs.m_entry);
|
||||
std::swap(m_poses, rhs.m_poses);
|
||||
}
|
||||
|
||||
FieldObject2d& FieldObject2d::operator=(FieldObject2d&& rhs) {
|
||||
std::swap(m_name, rhs.m_name);
|
||||
std::swap(m_entry, rhs.m_entry);
|
||||
std::swap(m_poses, rhs.m_poses);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void FieldObject2d::SetPose(const Pose2d& pose) {
|
||||
SetPoses(wpi::makeArrayRef(pose));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user