1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-22 14:32:58 +02:00

Manage Commands and CommandOutputTarget objects with smart pointers

This commit is contained in:
Paul Licameli
2016-03-31 07:40:05 -04:00
parent f4441d7476
commit e8ad90b3c9
42 changed files with 164 additions and 172 deletions

View File

@@ -27,7 +27,7 @@ class CompareAudioCommandType final : public CommandType
public:
wxString BuildName() override;
void BuildSignature(CommandSignature &signature) override;
Command *Create(CommandOutputTarget *target) override;
CommandHolder Create(std::unique_ptr<CommandOutputTarget> &&target) override;
};
class CompareAudioCommand final : public CommandImplementation
@@ -44,8 +44,8 @@ protected:
double CompareSample(double value1, double value2) /* not override */;
public:
CompareAudioCommand(CommandType &type, CommandOutputTarget *target)
: CommandImplementation(type, target)
CompareAudioCommand(CommandType &type, std::unique_ptr<CommandOutputTarget> &&target)
: CommandImplementation(type, std::move(target))
{ }
bool Apply(CommandExecutionContext context) override;
};