1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-06 03:32:09 +01: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

@@ -504,7 +504,7 @@ bool MacroCommands::IsMono()
return ( tracks->Any() - &Track::IsLeader ).empty();
}
wxString MacroCommands::BuildCleanFileName(const wxString &fileName,
wxString MacroCommands::BuildCleanFileName(const FilePath &fileName,
const FileExtension &extension)
{
const wxFileName newFileName{ fileName };
@@ -964,7 +964,7 @@ void MacroCommands::MigrateLegacyChains()
// which old Audacity will not read.
const auto oldDir = FileNames::LegacyChainDir();
wxArrayString files;
FilePaths files;
wxDir::GetAllFiles(oldDir, &files, wxT("*.txt"), wxDIR_FILES);
// add a dummy path component to be overwritten by SetFullName
@@ -987,7 +987,7 @@ wxArrayString MacroCommands::GetNames()
MigrateLegacyChains();
wxArrayString names;
wxArrayString files;
FilePaths files;
wxDir::GetAllFiles(FileNames::MacroDir(), &files, wxT("*.txt"), wxDIR_FILES);
size_t i;