1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-20 09:31:15 +02:00

Use type aliases FileExtension, FileExtensions...

... for wxString and wxArrayStringEx, holding file extensions (without dot);
to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)

And simplify some constructions of arrays
This commit is contained in:
Paul Licameli
2019-03-07 11:29:42 -05:00
parent df6a2cf479
commit 485b6bb425
34 changed files with 100 additions and 101 deletions

View File

@@ -72,7 +72,7 @@ public:
// Get a list of extensions this plugin expects to be able to
// import. If a filename matches any of these extensions,
// this importer will get first dibs on importing it.
virtual wxArrayString GetSupportedExtensions() = 0;
virtual FileExtensions GetSupportedExtensions() = 0;
virtual bool SupportsExtension(const wxString & extension) = 0;
// Create the client that will be used to import a file.

View File

@@ -84,7 +84,7 @@ public:
// This function returns nonempty only when that is the case, and lists
// the possible extensions of such files (an empty string in a nonempty
// array means any file is a candidate).
virtual wxArrayString GetFileExtensions() = 0;
virtual FileExtensions GetFileExtensions() = 0;
// Returns empty, or else, where to copy a plug-in file or bundle.
// Drag-and-drop is supported only if GetFileExtensions() returns nonempty and

View File

@@ -67,6 +67,12 @@ using PluginPaths = std::vector< PluginPath >;
using RegistryPath = wxString;
using RegistryPaths = std::vector< RegistryPath >;
class wxArrayStringEx;
// File extensions, not including any leading dot
using FileExtension = wxString;
using FileExtensions = wxArrayStringEx;
// ----------------------------------------------------------------------------
// A native 64-bit integer...used when referring to any number of samples
// ----------------------------------------------------------------------------