mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-27 08:36:10 +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:
@@ -205,7 +205,7 @@ bool GetInfoCommand::SendCommands(const CommandContext &context, int flags )
|
||||
while (plug)
|
||||
{
|
||||
auto command = em.GetCommandIdentifier(plug->GetID());
|
||||
if (!command.IsEmpty()){
|
||||
if (!command.empty()){
|
||||
em.GetCommandDefinition( plug->GetID(), context, flags );
|
||||
}
|
||||
plug = pm.GetNextPlugin(PluginTypeEffect | PluginTypeAudacityCommand );
|
||||
@@ -407,7 +407,7 @@ void GetInfoCommand::ExploreMenu( const CommandContext &context, wxMenu * pMenu,
|
||||
CommandManager * pMan = context.GetProject()->GetCommandManager();
|
||||
|
||||
wxMenuItemList list = pMenu->GetMenuItems();
|
||||
size_t lcnt = list.GetCount();
|
||||
size_t lcnt = list.size();
|
||||
wxMenuItem * item;
|
||||
wxString Label;
|
||||
wxString Accel;
|
||||
@@ -435,7 +435,7 @@ void GetInfoCommand::ExploreMenu( const CommandContext &context, wxMenu * pMenu,
|
||||
context.AddItem( flags, "flags" );
|
||||
context.AddItem( Label, "label" );
|
||||
context.AddItem( Accel, "accel" );
|
||||
if( !Name.IsEmpty() )
|
||||
if( !Name.empty() )
|
||||
context.AddItem( Name, "id" );// It is called Scripting ID outside Audacity.
|
||||
context.EndStruct();
|
||||
|
||||
@@ -572,7 +572,7 @@ void GetInfoCommand::ExploreWindows( const CommandContext &context,
|
||||
return;
|
||||
}
|
||||
wxWindowList list = pWin->GetChildren();
|
||||
size_t lcnt = list.GetCount();
|
||||
size_t lcnt = list.size();
|
||||
|
||||
for (size_t lndx = 0; lndx < lcnt; lndx++) {
|
||||
wxWindow * item = list[lndx];
|
||||
@@ -587,7 +587,7 @@ void GetInfoCommand::ExploreWindows( const CommandContext &context,
|
||||
// Ignore anonymous panels.
|
||||
if( Name == "panel" )
|
||||
continue;
|
||||
if( Name.IsEmpty() )
|
||||
if( Name.empty() )
|
||||
Name = wxString("*") + item->GetToolTipText();
|
||||
|
||||
context.StartStruct();
|
||||
|
||||
Reference in New Issue
Block a user