1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 08:39:46 +02:00

ModuleManager::CreateProviderInstance returns more specific type

This commit is contained in:
Paul Licameli 2019-03-08 15:18:20 -05:00
parent 961882838f
commit 5be54c5612
2 changed files with 3 additions and 4 deletions

View File

@ -509,8 +509,7 @@ void ModuleManager::FindAllPlugins(PluginIDs & providers, PluginPaths & paths)
{
PluginID providerID = modIDs[i];
ModuleInterface *module =
static_cast<ModuleInterface *>(CreateProviderInstance(providerID, modPaths[i]));
auto module = CreateProviderInstance(providerID, modPaths[i]);
if (!module)
continue;
@ -553,7 +552,7 @@ bool ModuleManager::RegisterEffectPlugin(const PluginID & providerID, const Plug
return nFound > 0;
}
ComponentInterface *ModuleManager::CreateProviderInstance(const PluginID & providerID,
ModuleInterface *ModuleManager::CreateProviderInstance(const PluginID & providerID,
const PluginPath & path)
{
if (path.empty() && mDynModules.find(providerID) != mDynModules.end())

View File

@ -102,7 +102,7 @@ public:
bool RegisterEffectPlugin(const PluginID & provider, const PluginPath & path,
wxString &errMsg);
ComponentInterface *CreateProviderInstance(const PluginID & provider, const PluginPath & path);
ModuleInterface *CreateProviderInstance(const PluginID & provider, const PluginPath & path);
ComponentInterface *CreateInstance(const PluginID & provider, const PluginPath & path);
void DeleteInstance(const PluginID & provider, ComponentInterface *instance);