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:
@@ -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)),
|
||||
|
Reference in New Issue
Block a user