1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-10 08:25:52 +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

@@ -33,7 +33,7 @@ FileHistory::~FileHistory()
}
// File history management
void FileHistory::AddFileToHistory(const wxString & file, bool update)
void FileHistory::AddFileToHistory(const FilePath & file, bool update)
{
// Needed to transition from wxFileHistory to FileHistory since there
// can be empty history "slots".
@@ -82,7 +82,7 @@ void FileHistory::Clear()
AddFilesToMenu();
}
const wxString &FileHistory::GetHistoryFile(size_t i) const
const FilePath &FileHistory::GetHistoryFile(size_t i) const
{
wxASSERT(i < mHistory.size());
@@ -90,7 +90,7 @@ const wxString &FileHistory::GetHistoryFile(size_t i) const
return mHistory[i];
}
static const wxString empty;
static const FilePath empty{};
return empty;
}