Skip to content

Commit dea86e8

Browse files
committed
Move supplier construction to ctor body
1 parent 27fbaae commit dea86e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wpilibNewCommands/src/main/native/cpp/frc2/command/ProxyCommand.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ ProxyCommand::ProxyCommand(Command* command)
1616
SetName(std::string{"Proxy("}.append(command->GetName()).append(")"));
1717
}
1818

19-
ProxyCommand::ProxyCommand(std::unique_ptr<Command> command)
20-
: m_supplier((
21-
SetName(std::string{"Proxy("}.append(command->GetName()).append(")")),
22-
[command = std::move(command)] { return command.get(); })) {}
19+
ProxyCommand::ProxyCommand(std::unique_ptr<Command> command) {
20+
SetName(std::string{"Proxy("}.append(command->GetName()).append(")"));
21+
m_supplier = [command = std::move(command)] { return command.get(); };
22+
}
2323

2424
void ProxyCommand::Initialize() {
2525
m_command = m_supplier();

0 commit comments

Comments
 (0)