[wpilibc] Add missing move constructors and assignment operators (#2959)

- Field2d
- FieldObject2d
- AnalogGyro
This commit is contained in:
Tyler Veness
2020-12-23 20:36:51 -08:00
committed by GitHub
parent 10b396b4c2
commit 952567dd3c
5 changed files with 34 additions and 2 deletions

View File

@@ -104,8 +104,8 @@ class AnalogGyro : public GyroBase {
~AnalogGyro() override;
AnalogGyro(AnalogGyro&& rhs);
AnalogGyro& operator=(AnalogGyro&& rhs);
AnalogGyro(AnalogGyro&& rhs) = default;
AnalogGyro& operator=(AnalogGyro&& rhs) = default;
/**
* Return the actual angle in degrees that the robot is currently facing.

View File

@@ -47,6 +47,9 @@ class Field2d : public Sendable {
Field2d();
Field2d(Field2d&& rhs);
Field2d& operator=(Field2d&& rhs);
/**
* Set the robot pose from a Pose object.
*

View File

@@ -36,6 +36,9 @@ class FieldObject2d {
FieldObject2d(std::string&& name, const private_init&)
: m_name{std::move(name)} {}
FieldObject2d(FieldObject2d&& rhs);
FieldObject2d& operator=(FieldObject2d&& rhs);
/**
* Set the pose from a Pose object.
*