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