mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-13 14:13:32 +02:00
Remove most uses of AUDACITY_OLD_STD
This commit is contained in:
@@ -124,13 +124,8 @@ void Importer::GetSupportedImportFormats(FormatList *formatList)
|
||||
{
|
||||
for(const auto &importPlugin : mImportPluginList)
|
||||
{
|
||||
#ifdef __AUDACITY_OLD_STD__
|
||||
formatList->push_back(Format{importPlugin->GetPluginFormatDescription(),
|
||||
importPlugin->GetSupportedExtensions()});
|
||||
#else
|
||||
formatList->emplace_back(importPlugin->GetPluginFormatDescription(),
|
||||
importPlugin->GetSupportedExtensions());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -21,28 +21,8 @@ class wxWindow;
|
||||
|
||||
#include <vector>
|
||||
|
||||
#ifdef __AUDACITY_OLD_STD__
|
||||
|
||||
class TrackHolder : public std::shared_ptr < WaveTrack >
|
||||
{
|
||||
public:
|
||||
// shared_ptr can construct from unique_ptr&& in newer std, but not older,
|
||||
// so define it here
|
||||
TrackHolder &operator=(std::unique_ptr<WaveTrack> &&that)
|
||||
{
|
||||
reset(that.release());
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
using TrackHolders = std::vector<TrackHolder>;
|
||||
|
||||
#else
|
||||
|
||||
using TrackHolders = std::vector<std::unique_ptr<WaveTrack>>;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void ImportRaw(wxWindow *parent, const wxString &fileName,
|
||||
TrackFactory *trackFactory, TrackHolders &outTracks);
|
||||
|
Reference in New Issue
Block a user