1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-15 07:01:18 +02:00

Simplify the FN macros in src/menus/*.cpp...

... Eliminate repetitious passing of the finder function into each of the
calls to Command and CommandGroup.
This commit is contained in:
Paul Licameli
2019-01-06 11:31:52 -05:00
parent 702b8b1e9d
commit 512c27d422
18 changed files with 233 additions and 123 deletions

View File

@@ -113,7 +113,7 @@ void ModNullCallback::OnFuncSecond(const CommandContext &)
}
ModNullCallback * pModNullCallback=NULL;
#define ModNullFN(X) ident, static_cast<CommandFunctorPointer>(&ModNullCallback:: X)
#define ModNullFN(X) static_cast<CommandFunctorPointer>((&ModNullCallback:: X))
extern "C" {
@@ -163,12 +163,12 @@ int ModuleDispatch(ModuleDispatchTypes type)
c->AddItem(
_T("A New Command"), // internal name
XO("1st Experimental Command..."), //displayed name
ModNullFN( OnFuncFirst ),
ident, ModNullFN( OnFuncFirst ),
AudioIONotBusyFlag );
c->AddItem(
_T("Another New Command"),
_T("Another New Command"),
XO("2nd Experimental Command"),
ModNullFN( OnFuncSecond ),
ident, ModNullFN( OnFuncSecond ),
AudioIONotBusyFlag );
c->ClearCurrentMenu();
}