mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
RobotBase: Call cscore Shutdown() from destructor
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <cstdio>
|
||||
|
||||
#include <cameraserver/CameraServerShared.h>
|
||||
#include <cscore.h>
|
||||
#include <hal/HAL.h>
|
||||
#include <networktables/NetworkTableInstance.h>
|
||||
|
||||
@@ -117,4 +118,6 @@ RobotBase::RobotBase() : m_ds(DriverStation::GetInstance()) {
|
||||
|
||||
RobotBase::RobotBase(RobotBase&&) : m_ds(DriverStation::GetInstance()) {}
|
||||
|
||||
RobotBase::~RobotBase() { cs::Shutdown(); }
|
||||
|
||||
RobotBase& RobotBase::operator=(RobotBase&&) { return *this; }
|
||||
|
||||
@@ -127,7 +127,7 @@ class RobotBase {
|
||||
*/
|
||||
RobotBase();
|
||||
|
||||
virtual ~RobotBase() = default;
|
||||
virtual ~RobotBase();
|
||||
|
||||
// m_ds isn't moved in these because DriverStation is a singleton; every
|
||||
// instance of RobotBase has a reference to the same object.
|
||||
|
||||
Reference in New Issue
Block a user