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();