mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-08 17:46:25 +01:00
make_movable -> std::make_unique
This commit is contained in:
@@ -162,7 +162,7 @@ void Importer::ReadImportItems()
|
||||
if (toker.CountTokens() != 2)
|
||||
break;
|
||||
|
||||
auto new_item = make_movable<ExtImportItem>();
|
||||
auto new_item = std::make_unique<ExtImportItem>();
|
||||
|
||||
/* First token is the filtering condition, second - the filter list */
|
||||
condition = toker.GetNextToken();
|
||||
@@ -309,7 +309,7 @@ void Importer::WriteImportItems()
|
||||
|
||||
movable_ptr<ExtImportItem> Importer::CreateDefaultImportItem()
|
||||
{
|
||||
auto new_item = make_movable<ExtImportItem>();
|
||||
auto new_item = std::make_unique<ExtImportItem>();
|
||||
new_item->extensions.Add(wxT("*"));
|
||||
new_item->mime_types.Add(wxT("*"));
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ private:
|
||||
void GetFFmpegImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( make_movable<FFmpegImportPlugin>() );
|
||||
importPluginList.push_back( std::make_unique<FFmpegImportPlugin>() );
|
||||
}
|
||||
|
||||
|
||||
@@ -590,7 +590,7 @@ ProgressResult FFmpegImportFileHandle::Import(TrackFactory *trackFactory,
|
||||
for (const auto &stream : mChannels) {
|
||||
++s;
|
||||
auto odTask =
|
||||
make_movable<ODDecodeFFmpegTask>(mScs, ODDecodeFFmpegTask::FromList(mChannels), mContext, s);
|
||||
std::make_unique<ODDecodeFFmpegTask>(mScs, ODDecodeFFmpegTask::FromList(mChannels), mContext, s);
|
||||
odTask->CreateFileDecoder(mFilename);
|
||||
|
||||
//each stream has different duration. We need to know it if seeking is to be allowed.
|
||||
|
||||
@@ -62,7 +62,7 @@ void GetFLACImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList)
|
||||
{
|
||||
unusableImportPluginList.push_back(
|
||||
make_movable<UnusableImportPlugin>
|
||||
std::make_unique<UnusableImportPlugin>
|
||||
(DESC, wxArrayString(WXSIZEOF(exts), exts))
|
||||
);
|
||||
}
|
||||
@@ -293,7 +293,7 @@ FLAC__StreamDecoderWriteStatus MyFLACFile::write_callback(const FLAC__Frame *fra
|
||||
void GetFLACImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( make_movable<FLACImportPlugin>() );
|
||||
importPluginList.push_back( std::make_unique<FLACImportPlugin>() );
|
||||
}
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@ FLACImportFileHandle::FLACImportFileHandle(const wxString & name)
|
||||
bool FLACImportFileHandle::Init()
|
||||
{
|
||||
#ifdef EXPERIMENTAL_OD_FLAC
|
||||
mDecoderTask = make_movable<ODDecodeFlacTask>();
|
||||
mDecoderTask = std::make_unique<ODDecodeFlacTask>();
|
||||
|
||||
ODFlacDecoder* odDecoder = (ODFlacDecoder*)mDecoderTask->CreateFileDecoder(mFilename);
|
||||
if(!odDecoder || !odDecoder->ReadHeader())
|
||||
@@ -522,7 +522,7 @@ ProgressResult FLACImportFileHandle::Import(TrackFactory *trackFactory,
|
||||
{
|
||||
//if we have 3 more channels, they get imported on seperate tracks, so we add individual tasks for each.
|
||||
ODManager::Instance()->AddNewTask(std::move(mDecoderTask));
|
||||
mDecoderTask = make_movable<ODDecodeFlacTask>(); //TODO: see if we need to use clone to keep the metadata.
|
||||
mDecoderTask = std::make_unique<ODDecodeFlacTask>(); //TODO: see if we need to use clone to keep the metadata.
|
||||
}
|
||||
}
|
||||
//if we have mono or a linked track (stereo), we add ONE task for the one linked wave track
|
||||
|
||||
@@ -299,7 +299,7 @@ GetGStreamerImportPlugin(ImportPluginList &importPluginList,
|
||||
nano);
|
||||
|
||||
// Instantiate plugin
|
||||
auto plug = make_movable<GStreamerImportPlugin>();
|
||||
auto plug = std::make_unique<GStreamerImportPlugin>();
|
||||
|
||||
// No supported extensions...no gstreamer plugins installed
|
||||
if (plug->GetSupportedExtensions().GetCount() == 0)
|
||||
@@ -569,7 +569,7 @@ GStreamerImportFileHandle::OnPadAdded(GstPad *pad)
|
||||
|
||||
{
|
||||
// Allocate a NEW stream context
|
||||
auto uc = make_movable<GStreamContext>();
|
||||
auto uc = std::make_unique<GStreamContext>();
|
||||
c = uc.get();
|
||||
if (!c)
|
||||
{
|
||||
|
||||
@@ -171,7 +171,7 @@ LOFImportFileHandle::LOFImportFileHandle
|
||||
void GetLOFImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList & WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( make_movable<LOFImportPlugin>() );
|
||||
importPluginList.push_back( std::make_unique<LOFImportPlugin>() );
|
||||
}
|
||||
|
||||
wxString LOFImportPlugin::GetPluginFormatDescription()
|
||||
|
||||
@@ -62,7 +62,7 @@ void GetMP3ImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList)
|
||||
{
|
||||
unusableImportPluginList.push_back(
|
||||
make_movable<UnusableImportPlugin>
|
||||
std::make_unique<UnusableImportPlugin>
|
||||
(DESC, wxArrayString(WXSIZEOF(exts), exts))
|
||||
);
|
||||
}
|
||||
@@ -159,7 +159,7 @@ private:
|
||||
void GetMP3ImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList & WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( make_movable<MP3ImportPlugin>() );
|
||||
importPluginList.push_back( std::make_unique<MP3ImportPlugin>() );
|
||||
}
|
||||
|
||||
/* The MAD callbacks */
|
||||
|
||||
@@ -60,7 +60,7 @@ void GetOGGImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList)
|
||||
{
|
||||
unusableImportPluginList.push_back(
|
||||
make_movable<UnusableImportPlugin>
|
||||
std::make_unique<UnusableImportPlugin>
|
||||
(DESC, wxArrayString(WXSIZEOF(exts), exts))
|
||||
);
|
||||
}
|
||||
@@ -163,7 +163,7 @@ private:
|
||||
void GetOGGImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList & WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( make_movable<OggImportPlugin>() );
|
||||
importPluginList.push_back( std::make_unique<OggImportPlugin>() );
|
||||
}
|
||||
|
||||
wxString OggImportPlugin::GetPluginFormatDescription()
|
||||
|
||||
@@ -117,7 +117,7 @@ private:
|
||||
void GetPCMImportPlugin(ImportPluginList & importPluginList,
|
||||
UnusableImportPluginList & WXUNUSED(unusableImportPluginList))
|
||||
{
|
||||
importPluginList.push_back( make_movable<PCMImportPlugin>() );
|
||||
importPluginList.push_back( std::make_unique<PCMImportPlugin>() );
|
||||
}
|
||||
|
||||
wxString PCMImportPlugin::GetPluginFormatDescription()
|
||||
@@ -436,7 +436,7 @@ ProgressResult PCMImportFileHandle::Import(TrackFactory *trackFactory,
|
||||
|
||||
if(useOD)
|
||||
{
|
||||
auto computeTask = make_movable<ODComputeSummaryTask>();
|
||||
auto computeTask = std::make_unique<ODComputeSummaryTask>();
|
||||
bool moreThanStereo = mInfo.channels>2;
|
||||
for (const auto &channel : channels)
|
||||
{
|
||||
@@ -445,7 +445,7 @@ ProgressResult PCMImportFileHandle::Import(TrackFactory *trackFactory,
|
||||
{
|
||||
//if we have 3 more channels, they get imported on seperate tracks, so we add individual tasks for each.
|
||||
ODManager::Instance()->AddNewTask(std::move(computeTask));
|
||||
computeTask = make_movable<ODComputeSummaryTask>();
|
||||
computeTask = std::make_unique<ODComputeSummaryTask>();
|
||||
}
|
||||
}
|
||||
//if we have a linked track, we add ONE task.
|
||||
|
||||
@@ -41,7 +41,7 @@ void GetQTImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList)
|
||||
{
|
||||
unusableImportPluginList.push_back(
|
||||
make_movable<UnusableImportPlugin>
|
||||
std::make_unique<UnusableImportPlugin>
|
||||
(DESC, wxArrayString(WXSIZEOF(exts), exts))
|
||||
);
|
||||
}
|
||||
@@ -173,7 +173,7 @@ class QTImportFileHandle final : public ImportFileHandle
|
||||
void GetQTImportPlugin(ImportPluginList &importPluginList,
|
||||
UnusableImportPluginList &unusableImportPluginList)
|
||||
{
|
||||
importPluginList.push_back( make_movable<QTImportPlugin>() );
|
||||
importPluginList.push_back( std::make_unique<QTImportPlugin>() );
|
||||
}
|
||||
|
||||
wxString QTImportPlugin::GetPluginFormatDescription()
|
||||
|
||||
Reference in New Issue
Block a user