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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user