From 6db58a2cc0d3eb3e8d0ffa075f8bb9f69e85f7a7 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Wed, 16 Sep 2015 21:40:39 -0700 Subject: [PATCH] PIDSubsystem.cpp: Use make_shared instead of make_unique. m_controller is a std::shared_ptr, so make_shared should be used. Change-Id: I77c855a3055a372ab3feba1a1d8e5c4bac42157f --- wpilibc/wpilibC++/src/Commands/PIDSubsystem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wpilibc/wpilibC++/src/Commands/PIDSubsystem.cpp b/wpilibc/wpilibC++/src/Commands/PIDSubsystem.cpp index e48319abff..b3d327fb6f 100644 --- a/wpilibc/wpilibC++/src/Commands/PIDSubsystem.cpp +++ b/wpilibc/wpilibC++/src/Commands/PIDSubsystem.cpp @@ -34,7 +34,7 @@ PIDSubsystem::PIDSubsystem(const std::string &name, double p, double i, double d PIDSubsystem::PIDSubsystem(const std::string &name, double p, double i, double d, double f) : Subsystem(name) { - m_controller = std::make_unique(p, i, d, f, this, this); + m_controller = std::make_shared(p, i, d, f, this, this); } /** @@ -51,7 +51,7 @@ PIDSubsystem::PIDSubsystem(const std::string &name, double p, double i, double d PIDSubsystem::PIDSubsystem(const std::string &name, double p, double i, double d, double f, double period) : Subsystem(name) { - m_controller = std::make_unique(p, i, d, f, this, this, period); + m_controller = std::make_shared(p, i, d, f, this, this, period); } /** @@ -64,7 +64,7 @@ PIDSubsystem::PIDSubsystem(const std::string &name, double p, double i, double d */ PIDSubsystem::PIDSubsystem(double p, double i, double d) : Subsystem("PIDSubsystem") { - m_controller = std::make_unique(p, i, d, this, this); + m_controller = std::make_shared(p, i, d, this, this); } /** @@ -78,7 +78,7 @@ PIDSubsystem::PIDSubsystem(double p, double i, double d) */ PIDSubsystem::PIDSubsystem(double p, double i, double d, double f) : Subsystem("PIDSubsystem") { - m_controller = std::make_unique(p, i, d, f, this, this); + m_controller = std::make_shared(p, i, d, f, this, this); } /** @@ -96,7 +96,7 @@ PIDSubsystem::PIDSubsystem(double p, double i, double d, double f) PIDSubsystem::PIDSubsystem(double p, double i, double d, double f, double period) : Subsystem("PIDSubsystem") { - m_controller = std::make_unique(p, i, d, f, this, this, period); + m_controller = std::make_shared(p, i, d, f, this, this, period); } /**