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

movable_ptr(_with_deleter) -> std::unique_ptr

This commit is contained in:
Paul Licameli
2018-04-16 13:47:44 -04:00
parent b8a8712ba0
commit a9e7a7e5d5
53 changed files with 69 additions and 69 deletions

View File

@@ -307,7 +307,7 @@ void Importer::WriteImportItems()
} while( true );
}
movable_ptr<ExtImportItem> Importer::CreateDefaultImportItem()
std::unique_ptr<ExtImportItem> Importer::CreateDefaultImportItem()
{
auto new_item = std::make_unique<ExtImportItem>();
new_item->extensions.Add(wxT("*"));

View File

@@ -44,7 +44,7 @@ public:
class ExtImportItem;
using FormatList = std::vector<Format> ;
using ExtImportItems = std::vector< movable_ptr<ExtImportItem> >;
using ExtImportItems = std::vector< std::unique_ptr<ExtImportItem> >;
class ExtImportItem
{
@@ -134,7 +134,7 @@ public:
* Allocates NEW ExtImportItem, fills it with default data
* and returns a pointer to it.
*/
movable_ptr<ExtImportItem> CreateDefaultImportItem();
std::unique_ptr<ExtImportItem> CreateDefaultImportItem();
static bool IsMidi(const wxString &fName);

View File

@@ -584,7 +584,7 @@ ProgressResult FFmpegImportFileHandle::Import(TrackFactory *trackFactory,
//at this point we know the file is good and that we have to load the number of channels in mScs[s]->m_stream->codec->channels;
//so for OD loading we create the tracks and releasee the modal lock after starting the ODTask.
if (mUsingOD) {
std::vector<movable_ptr<ODDecodeFFmpegTask>> tasks;
std::vector<std::unique_ptr<ODDecodeFFmpegTask>> tasks;
//append blockfiles to each stream and add an individual ODDecodeTask for each one.
s = -1;
for (const auto &stream : mChannels) {

View File

@@ -182,7 +182,7 @@ private:
bool mStreamInfoDone;
ProgressResult mUpdateResult;
TrackHolders mChannels;
movable_ptr<ODDecodeFlacTask> mDecoderTask;
std::unique_ptr<ODDecodeFlacTask> mDecoderTask;
};

View File

@@ -16,8 +16,8 @@ class ImportPlugin;
class UnusableImportPlugin;
using ImportPluginList =
std::vector< movable_ptr<ImportPlugin> >;
std::vector< std::unique_ptr<ImportPlugin> >;
using UnusableImportPluginList =
std::vector< movable_ptr<UnusableImportPlugin> >;
std::vector< std::unique_ptr<UnusableImportPlugin> >;
#endif

View File

@@ -232,7 +232,7 @@ private:
bool mAsyncDone; //!< true = 1st async-done message received
GMutex mStreamsLock; //!< Mutex protecting the mStreams array
std::vector<movable_ptr<GStreamContext>> mStreams; //!< Array of pointers to stream contexts
std::vector<std::unique_ptr<GStreamContext>> mStreams; //!< Array of pointers to stream contexts
};
/// A representative of GStreamer loader in