mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-26 22:51:21 +01:00
Manage the members of CommandOutputTarget with smart pointers
This commit is contained in:
@@ -257,9 +257,9 @@ std::unique_ptr<ScreenshotCommand> ScreenFrame::CreateCommand()
|
||||
{
|
||||
wxASSERT(mStatus != NULL);
|
||||
auto output =
|
||||
std::make_unique<CommandOutputTarget>(new NullProgressTarget(),
|
||||
new StatusBarTarget(*mStatus),
|
||||
new MessageBoxTarget());
|
||||
std::make_unique<CommandOutputTarget>(std::make_unique<NullProgressTarget>(),
|
||||
std::make_shared<StatusBarTarget>(*mStatus),
|
||||
std::make_shared<MessageBoxTarget>());
|
||||
CommandType *type = CommandDirectory::Get()->LookUp(wxT("Screenshot"));
|
||||
wxASSERT_MSG(type != NULL, wxT("Screenshot command doesn't exist!"));
|
||||
return std::make_unique<ScreenshotCommand>(*type, std::move(output), this);
|
||||
|
||||
Reference in New Issue
Block a user