mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-20 21:21:25 +01:00
Less use of wxArrayString::Index() ...
... instead use the utility make_iterator_range and its index() or contains() method. This generic utility works with any container defining begin() and end(). This further lessens dependency on wxWidgets container idioms.
This commit is contained in:
@@ -98,7 +98,7 @@ MacroCommands::MacroCommands()
|
||||
|
||||
for( size_t i = 0;i<defaults.size();i++){
|
||||
wxString name = defaults[i];
|
||||
if (names.Index(name) == wxNOT_FOUND) {
|
||||
if ( ! make_iterator_range( names ).contains(name) ) {
|
||||
AddMacro(name);
|
||||
RestoreMacro(name);
|
||||
WriteMacro(name);
|
||||
@@ -1005,7 +1005,7 @@ wxArrayString MacroCommands::GetNames()
|
||||
bool MacroCommands::IsFixed(const wxString & name)
|
||||
{
|
||||
wxArrayString defaults = GetNamesOfDefaultMacros();
|
||||
if( defaults.Index( name ) != wxNOT_FOUND )
|
||||
if( make_iterator_range( defaults ).contains( name ) )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user