1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 14:02:57 +02:00

Use type aliases RegistryPath, RegistryPaths...

... for wxString and vector thereof, holding strings that key into wxConfigBase;
to be replaced later with different types
This commit is contained in:
Paul Licameli
2019-03-01 12:20:51 -05:00
parent dcd211affa
commit df6a2cf479
20 changed files with 295 additions and 287 deletions

View File

@@ -522,7 +522,7 @@ void AudioUnitEffectExportDialog::PopulateOrExchange(ShuttleGui & S)
S.AddStandardButtons();
wxArrayString presets;
RegistryPaths presets;
mEffect->mHost->GetPrivateConfigSubgroups(mEffect->mHost->GetUserPresetsGroup(wxEmptyString), presets);
@@ -1623,12 +1623,12 @@ bool AudioUnitEffect::SetAutomationParameters(CommandParameters & parms)
return true;
}
bool AudioUnitEffect::LoadUserPreset(const wxString & name)
bool AudioUnitEffect::LoadUserPreset(const RegistryPath & name)
{
return LoadParameters(name);
}
bool AudioUnitEffect::SaveUserPreset(const wxString & name)
bool AudioUnitEffect::SaveUserPreset(const RegistryPath & name)
{
return SaveParameters(name);
}
@@ -1683,10 +1683,10 @@ bool AudioUnitEffect::LoadFactoryDefaults()
return LoadParameters(mHost->GetFactoryDefaultsGroup());
}
wxArrayString AudioUnitEffect::GetFactoryPresets()
RegistryPaths AudioUnitEffect::GetFactoryPresets()
{
OSStatus result;
wxArrayString presets;
RegistryPaths presets;
// Retrieve the list of factory presets
CFArrayRef array{};
@@ -1873,7 +1873,7 @@ void AudioUnitEffect::ShowOptions()
// AudioUnitEffect Implementation
// ============================================================================
bool AudioUnitEffect::LoadParameters(const wxString & group)
bool AudioUnitEffect::LoadParameters(const RegistryPath & group)
{
wxString parms;
if (!mHost->GetPrivateConfig(group, wxT("Parameters"), parms, wxEmptyString))
@@ -1890,7 +1890,7 @@ bool AudioUnitEffect::LoadParameters(const wxString & group)
return SetAutomationParameters(eap);
}
bool AudioUnitEffect::SaveParameters(const wxString & group)
bool AudioUnitEffect::SaveParameters(const RegistryPath & group)
{
CommandParameters eap;
if (!GetAutomationParameters(eap))

View File

@@ -106,12 +106,12 @@ public:
bool GetAutomationParameters(CommandParameters & parms) override;
bool SetAutomationParameters(CommandParameters & parms) override;
bool LoadUserPreset(const wxString & name) override;
bool SaveUserPreset(const wxString & name) override;
bool LoadUserPreset(const RegistryPath & name) override;
bool SaveUserPreset(const RegistryPath & name) override;
bool LoadFactoryPreset(int id) override;
bool LoadFactoryDefaults() override;
wxArrayString GetFactoryPresets() override;
RegistryPaths GetFactoryPresets() override;
// EffectUIClientInterface implementation
@@ -162,8 +162,8 @@ private:
void GetChannelCounts();
bool LoadParameters(const wxString & group);
bool SaveParameters(const wxString & group);
bool LoadParameters(const RegistryPath & group);
bool SaveParameters(const RegistryPath & group);
bool CreatePlain(wxWindow *parent);