1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-15 07:01:18 +02:00

Use type aliases FilePath, FilePaths...

... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
This commit is contained in:
Paul Licameli
2019-03-07 14:50:22 -05:00
parent 485b6bb425
commit a30000cf74
80 changed files with 371 additions and 342 deletions

View File

@@ -81,14 +81,14 @@ public:
wxString GetPluginStringID() override { return wxT("libsndfile"); }
wxString GetPluginFormatDescription() override;
std::unique_ptr<ImportFileHandle> Open(const wxString &Filename) override;
std::unique_ptr<ImportFileHandle> Open(const FilePath &Filename) override;
};
class PCMImportFileHandle final : public ImportFileHandle
{
public:
PCMImportFileHandle(wxString name, SFFile &&file, SF_INFO info);
PCMImportFileHandle(const FilePath &name, SFFile &&file, SF_INFO info);
~PCMImportFileHandle();
wxString GetFileDescription() override;
@@ -124,7 +124,7 @@ wxString PCMImportPlugin::GetPluginFormatDescription()
return DESC;
}
std::unique_ptr<ImportFileHandle> PCMImportPlugin::Open(const wxString &filename)
std::unique_ptr<ImportFileHandle> PCMImportPlugin::Open(const FilePath &filename)
{
SF_INFO info;
wxFile f; // will be closed when it goes out of scope
@@ -188,7 +188,7 @@ std::unique_ptr<ImportFileHandle> PCMImportPlugin::Open(const wxString &filename
return std::make_unique<PCMImportFileHandle>(filename, std::move(file), info);
}
PCMImportFileHandle::PCMImportFileHandle(wxString name,
PCMImportFileHandle::PCMImportFileHandle(const FilePath &name,
SFFile &&file, SF_INFO info)
: ImportFileHandle(name),
mFile(std::move(file)),