From 9872e676d85a67039d87a2f4f4e0a797ce530494 Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Mon, 2 Jan 2023 10:59:12 -0500 Subject: [PATCH] [commands] Make Subsystem destructor virtual (#4892) C++ best practice if there are other functions that are virtual. --- .../src/main/native/include/frc2/command/Subsystem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/Subsystem.h b/wpilibNewCommands/src/main/native/include/frc2/command/Subsystem.h index c38a099364..0c3a2a3282 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/Subsystem.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/Subsystem.h @@ -38,7 +38,7 @@ class CommandPtr; */ class Subsystem { public: - ~Subsystem(); + virtual ~Subsystem(); /** * This method is called periodically by the CommandScheduler. Useful for * updating subsystem-specific state that you don't want to offload to a