mirror of
https://github.com/cookiengineer/audacity
synced 2026-04-02 12:35:11 +02:00
Complementary un-registration of providers; change function name
This commit is contained in:
@@ -182,13 +182,23 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterBuiltinModule(ModuleMain moduleMain)
|
||||
void RegisterProvider(ModuleMain moduleMain)
|
||||
{
|
||||
builtinModuleList().push_back(moduleMain);
|
||||
auto &list = builtinModuleList();
|
||||
if ( moduleMain )
|
||||
list.push_back(moduleMain);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void UnregisterProvider(ModuleMain moduleMain)
|
||||
{
|
||||
auto &list = builtinModuleList();
|
||||
auto end = list.end(), iter = std::find(list.begin(), end, moduleMain);
|
||||
if (iter != end)
|
||||
list.erase(iter);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Creation/Destruction
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user