mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-06 22:45:29 +01:00
Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to std::vectors of other string-like classes for wxString, IsEmpty => empty Clear => clear Alloc => reserve for wxArrayString, Count => size GetCount => size IsEmpty => empty Add => push_back Clear => clear Empty => clear Sort => std::sort (only with default comparator) SetCount => resize Last => back Item => operator [] Alloc => reserve
This commit is contained in:
@@ -52,9 +52,9 @@ void ModulePrefs::GetAllModuleStatuses(){
|
||||
|
||||
// TODO: On an Audacity upgrade we should (?) actually untick modules.
|
||||
// The old modules might be still around, and we do not want to use them.
|
||||
mModules.Clear();
|
||||
mModules.clear();
|
||||
mStatuses.clear();
|
||||
mPaths.Clear();
|
||||
mPaths.clear();
|
||||
|
||||
|
||||
// Iterate through all Modules listed in prefs.
|
||||
@@ -72,9 +72,9 @@ void ModulePrefs::GetAllModuleStatuses(){
|
||||
gPrefs->Write( str, iStatus );
|
||||
}
|
||||
//wxLogDebug( wxT("Entry: %s Value: %i"), str, iStatus );
|
||||
mModules.Add( str );
|
||||
mModules.push_back( str );
|
||||
mStatuses.push_back( iStatus );
|
||||
mPaths.Add( fname );
|
||||
mPaths.push_back( fname );
|
||||
}
|
||||
bCont = gPrefs->GetNextEntry(str, dummy);
|
||||
}
|
||||
@@ -115,11 +115,11 @@ void ModulePrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
S.StartMultiColumn( 2 );
|
||||
int i;
|
||||
for(i=0;i<(int)mModules.GetCount();i++)
|
||||
for(i=0;i<(int)mModules.size();i++)
|
||||
S.TieChoice( mModules[i], mStatuses[i], &StatusChoices );
|
||||
S.EndMultiColumn();
|
||||
}
|
||||
if( mModules.GetCount() < 1 )
|
||||
if( mModules.size() < 1 )
|
||||
{
|
||||
S.AddFixedText( _("No modules were found") );
|
||||
}
|
||||
@@ -133,7 +133,7 @@ bool ModulePrefs::Commit()
|
||||
ShuttleGui S(this, eIsSavingToPrefs);
|
||||
PopulateOrExchange(S);
|
||||
int i;
|
||||
for(i=0;i<(int)mPaths.GetCount();i++)
|
||||
for(i=0;i<(int)mPaths.size();i++)
|
||||
SetModuleStatus( mPaths[i], mStatuses[i] );
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user