Fix implicitly deleted move constructors (#1954)

These were incorrect and exhibited as warnings on more recent versions of
clang (notably on Mac).

- Use pointers instead of references internally in GenericHID and *Drive
- Leave PIDBase, PIDController, and Resource non-moveable
- Remove the atomic from m_disabled in NidecBrushless
- Make Timer and Trigger copyable as well as moveable
- Implement custom move constructor/assignment for SendableChooserBase

Also comment out some unused variables that caused clang warnings.
This commit is contained in:
Peter Johnson
2019-10-19 11:36:44 -07:00
committed by GitHub
parent f3ad927f45
commit 2c50937975
19 changed files with 160 additions and 108 deletions

View File

@@ -7,8 +7,6 @@
#pragma once
#include <atomic>
#include "frc/DigitalOutput.h"
#include "frc/ErrorBase.h"
#include "frc/MotorSafety.h"
@@ -102,7 +100,7 @@ class NidecBrushless : public SpeedController,
private:
bool m_isInverted = false;
std::atomic_bool m_disabled{false};
bool m_disabled = false;
DigitalOutput m_dio;
PWM m_pwm;
double m_speed = 0.0;