mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 22:12:58 +02:00
Define and use wxArrayStringEx...
reducing verbosity where there were repeated calls of Add(), and defining move construction and assignment for efficient returns from functions
This commit is contained in:
@@ -931,12 +931,13 @@ teThemeType ThemeBase::GetFallbackThemeType(){
|
||||
|
||||
teThemeType ThemeBase::ThemeTypeOfTypeName( const wxString & Name )
|
||||
{
|
||||
wxArrayString aThemes;
|
||||
aThemes.Add( "classic" );
|
||||
aThemes.Add( "dark" );
|
||||
aThemes.Add( "light" );
|
||||
aThemes.Add( "high-contrast" );
|
||||
aThemes.Add( "custom" );
|
||||
static const wxArrayStringEx aThemes{
|
||||
"classic" ,
|
||||
"dark" ,
|
||||
"light" ,
|
||||
"high-contrast" ,
|
||||
"custom" ,
|
||||
};
|
||||
int themeIx = make_iterator_range( aThemes ).index( Name );
|
||||
if( themeIx < 0 )
|
||||
return GetFallbackThemeType();
|
||||
|
Reference in New Issue
Block a user