From 10e8fdb72499162dc19779d21625292c96bffa18 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Wed, 8 Jan 2020 23:17:12 -0800 Subject: [PATCH] Make C++ IterativeRobotBase and RobotBase constructor and destructor public (#2242) --- wpilibc/src/main/native/include/frc/IterativeRobotBase.h | 4 ++-- wpilibc/src/main/native/include/frc/RobotBase.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wpilibc/src/main/native/include/frc/IterativeRobotBase.h b/wpilibc/src/main/native/include/frc/IterativeRobotBase.h index b78765a198..ff159c49df 100644 --- a/wpilibc/src/main/native/include/frc/IterativeRobotBase.h +++ b/wpilibc/src/main/native/include/frc/IterativeRobotBase.h @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -138,7 +138,6 @@ class IterativeRobotBase : public RobotBase { */ virtual void TestPeriodic(); - protected: /** * Constructor for IterativeRobotBase. * @@ -156,6 +155,7 @@ class IterativeRobotBase : public RobotBase { virtual ~IterativeRobotBase() = default; + protected: IterativeRobotBase(IterativeRobotBase&&) = default; IterativeRobotBase& operator=(IterativeRobotBase&&) = default; diff --git a/wpilibc/src/main/native/include/frc/RobotBase.h b/wpilibc/src/main/native/include/frc/RobotBase.h index 725aa97da0..e225c185bb 100644 --- a/wpilibc/src/main/native/include/frc/RobotBase.h +++ b/wpilibc/src/main/native/include/frc/RobotBase.h @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -176,7 +176,6 @@ class RobotBase { static constexpr bool IsSimulation() { return !IsReal(); } - protected: /** * Constructor for a generic robot program. * @@ -192,6 +191,7 @@ class RobotBase { virtual ~RobotBase(); + protected: // m_ds isn't moved in these because DriverStation is a singleton; every // instance of RobotBase has a reference to the same object. RobotBase(RobotBase&&) noexcept;