1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-04 02:33:14 +01: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]; PluginID providerID = modIDs[i];
ModuleInterface *module = auto module = CreateProviderInstance(providerID, modPaths[i]);
static_cast<ModuleInterface *>(CreateProviderInstance(providerID, modPaths[i]));
if (!module) if (!module)
continue; continue;
@@ -553,7 +552,7 @@ bool ModuleManager::RegisterEffectPlugin(const PluginID & providerID, const Plug
return nFound > 0; return nFound > 0;
} }
ComponentInterface *ModuleManager::CreateProviderInstance(const PluginID & providerID, ModuleInterface *ModuleManager::CreateProviderInstance(const PluginID & providerID,
const PluginPath & path) const PluginPath & path)
{ {
if (path.empty() && mDynModules.find(providerID) != mDynModules.end()) if (path.empty() && mDynModules.find(providerID) != mDynModules.end())

View File

@@ -102,7 +102,7 @@ public:
bool RegisterEffectPlugin(const PluginID & provider, const PluginPath & path, bool RegisterEffectPlugin(const PluginID & provider, const PluginPath & path,
wxString &errMsg); 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); ComponentInterface *CreateInstance(const PluginID & provider, const PluginPath & path);
void DeleteInstance(const PluginID & provider, ComponentInterface *instance); void DeleteInstance(const PluginID & provider, ComponentInterface *instance);