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

make_movable -> std::make_unique

This commit is contained in:
Paul Licameli
2018-04-16 13:31:17 -04:00
parent 7a0475e39f
commit b8a8712ba0
35 changed files with 97 additions and 97 deletions

View File

@@ -24,11 +24,11 @@ IdentInterfaceSymbol BatchEvalCommandType::BuildName()
void BatchEvalCommandType::BuildSignature(CommandSignature &signature)
{
auto commandNameValidator = make_movable<DefaultValidator>();
auto commandNameValidator = std::make_unique<DefaultValidator>();
signature.AddParameter(wxT("CommandName"), wxT(""), std::move(commandNameValidator));
auto paramValidator = make_movable<DefaultValidator>();
auto paramValidator = std::make_unique<DefaultValidator>();
signature.AddParameter(wxT("ParamString"), wxT(""), std::move(paramValidator));
auto macroValidator = make_movable<DefaultValidator>();
auto macroValidator = std::make_unique<DefaultValidator>();
signature.AddParameter(wxT("MacroName"), wxT(""), std::move(macroValidator));
}

View File

@@ -28,38 +28,38 @@ CommandDirectory::CommandDirectory()
{
// Create the command map.
// First we have commands which return information
//AddCommand(make_movable<MessageCommandType>());
AddCommand(make_movable<BatchEvalCommandType>());
//AddCommand(std::make_unique<MessageCommandType>());
AddCommand(std::make_unique<BatchEvalCommandType>());
// Legacy adapter commands that previously was needed to
// access menu items.
//AddCommand(make_movable<ExecMenuCommandType>());
//AddCommand(std::make_unique<ExecMenuCommandType>());
// Not needed. Sets selected/solo/mute on multiple tracks.
//AddCommand(make_movable<SetProjectInfoCommandType>());
//AddCommand(std::make_unique<SetProjectInfoCommandType>());
// Moved to AudacityCommand
// AddCommand(make_movable<OpenProjectCommandType>());
// AddCommand(make_movable<SaveProjectCommandType>());
// AddCommand(make_movable<ImportCommandType>());
// AddCommand(make_movable<ExportCommandType>());
// AddCommand(make_movable<HelpCommandType>());
// AddCommand(make_movable<GetInfoCommandType>("GetAll"));
// AddCommand(make_movable<GetInfoCommandType>("GetCommands"));
// AddCommand(make_movable<GetInfoCommandType>("GetMenus"));
// AddCommand(make_movable<GetInfoCommandType>("GetMenusPlus"));
// AddCommand(make_movable<GetInfoCommandType>("GetBoxes"));
// AddCommand(make_movable<GetInfoCommandType>("GetClips"));
// AddCommand(std::make_unique<OpenProjectCommandType>());
// AddCommand(std::make_unique<SaveProjectCommandType>());
// AddCommand(std::make_unique<ImportCommandType>());
// AddCommand(std::make_unique<ExportCommandType>());
// AddCommand(std::make_unique<HelpCommandType>());
// AddCommand(std::make_unique<GetInfoCommandType>("GetAll"));
// AddCommand(std::make_unique<GetInfoCommandType>("GetCommands"));
// AddCommand(std::make_unique<GetInfoCommandType>("GetMenus"));
// AddCommand(std::make_unique<GetInfoCommandType>("GetMenusPlus"));
// AddCommand(std::make_unique<GetInfoCommandType>("GetBoxes"));
// AddCommand(std::make_unique<GetInfoCommandType>("GetClips"));
// AddCommand(make_movable<GetTrackInfoCommandType>());
// AddCommand(make_movable<GetProjectInfoCommandType>());
// AddCommand(make_movable<CompareAudioCommandType>());
// AddCommand(make_movable<GetPreferenceCommandType>());
// AddCommand(make_movable<SetPreferenceCommandType>());
// AddCommand(make_movable<ScreenshotCommandType>());
// AddCommand(make_movable<SelectCommandType>());
// AddCommand(make_movable<SetTrackInfoCommandType>());
// AddCommand(std::make_unique<GetTrackInfoCommandType>());
// AddCommand(std::make_unique<GetProjectInfoCommandType>());
// AddCommand(std::make_unique<CompareAudioCommandType>());
// AddCommand(std::make_unique<GetPreferenceCommandType>());
// AddCommand(std::make_unique<SetPreferenceCommandType>());
// AddCommand(std::make_unique<ScreenshotCommandType>());
// AddCommand(std::make_unique<SelectCommandType>());
// AddCommand(std::make_unique<SetTrackInfoCommandType>());
}

View File

@@ -631,7 +631,7 @@ void CommandManager::EndMenu()
wxMenu* CommandManager::BeginSubMenu(const wxString & tName)
{
mSubMenuList.push_back
(make_movable< SubMenuListEntry > ( tName, std::make_unique<wxMenu>() ));
(std::make_unique< SubMenuListEntry > ( tName, std::make_unique<wxMenu>() ));
mbSeparatorAllowed = false;
return mSubMenuList.back()->menu.get();
}
@@ -1014,7 +1014,7 @@ CommandListEntry *CommandManager::NewIdentifier(const wxString & nameIn,
{
// Make a unique_ptr or shared_ptr as appropriate:
auto entry = make_movable<CommandListEntry>();
auto entry = std::make_unique<CommandListEntry>();
wxString labelPrefix;
if (!mSubMenuList.empty()) {

View File

@@ -36,7 +36,7 @@ threshold of difference in two selected tracks
#include "CommandContext.h"
extern void RegisterCompareAudio( Registrar & R){
R.AddCommand( make_movable<CompareAudioCommand>() );
R.AddCommand( std::make_unique<CompareAudioCommand>() );
// std::unique_ptr<CommandOutputTargets> &&target
// return std::make_shared<CompareAudioCommand>(*this, std::move(target));