From dea86e8e3607b1ae50df3d250fadc9ae112fed9f Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Tue, 29 Aug 2023 15:38:59 -0400 Subject: [PATCH] Move supplier construction to ctor body --- .../src/main/native/cpp/frc2/command/ProxyCommand.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wpilibNewCommands/src/main/native/cpp/frc2/command/ProxyCommand.cpp b/wpilibNewCommands/src/main/native/cpp/frc2/command/ProxyCommand.cpp index ec3e247819d..9cdaa9fbca2 100644 --- a/wpilibNewCommands/src/main/native/cpp/frc2/command/ProxyCommand.cpp +++ b/wpilibNewCommands/src/main/native/cpp/frc2/command/ProxyCommand.cpp @@ -16,10 +16,10 @@ ProxyCommand::ProxyCommand(Command* command) SetName(std::string{"Proxy("}.append(command->GetName()).append(")")); } -ProxyCommand::ProxyCommand(std::unique_ptr command) - : m_supplier(( - SetName(std::string{"Proxy("}.append(command->GetName()).append(")")), - [command = std::move(command)] { return command.get(); })) {} +ProxyCommand::ProxyCommand(std::unique_ptr command) { + SetName(std::string{"Proxy("}.append(command->GetName()).append(")")); + m_supplier = [command = std::move(command)] { return command.get(); }; +} void ProxyCommand::Initialize() { m_command = m_supplier();