From b78534dcb0b16420297369ba5ffad581d3c112c9 Mon Sep 17 00:00:00 2001 From: aryanrawlani28 Date: Wed, 12 Aug 2020 18:10:13 +0530 Subject: [PATCH] BASE: PLUGINS: Seperate declaration/definition of StaticPlugins. - Move declarations inside plugins.h to make it visible to detection/detection.cpp --- base/plugins.cpp | 26 +++++++++++--------------- base/plugins.h | 9 +++++++++ 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/base/plugins.cpp b/base/plugins.cpp index f8976804de7..4596281440b 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -58,23 +58,19 @@ const char *Plugin::getEngineId() const { return nullptr; } -class StaticPlugin : public Plugin { -public: - StaticPlugin(PluginObject *pluginobject, PluginType type) { - assert(pluginobject); - assert(type < PLUGIN_TYPE_MAX); - _pluginObject = pluginobject; - _type = type; - } +StaticPlugin::StaticPlugin(PluginObject *pluginobject, PluginType type) { + assert(pluginobject); + assert(type < PLUGIN_TYPE_MAX); + _pluginObject = pluginobject; + _type = type; +} - ~StaticPlugin() { - delete _pluginObject; - } - - virtual bool loadPlugin() { return true; } - virtual void unloadPlugin() {} -}; +StaticPlugin::~StaticPlugin() { + delete _pluginObject; +} +bool StaticPlugin::loadPlugin() { return true; } +void StaticPlugin::unloadPlugin() {} class StaticPluginProvider : public PluginProvider { public: StaticPluginProvider() { diff --git a/base/plugins.h b/base/plugins.h index fc62dd44457..cc40feb6184 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -215,6 +215,15 @@ public: virtual const char *getFileName() const { return 0; } }; +class StaticPlugin : public Plugin { +public: + StaticPlugin(PluginObject *pluginobject, PluginType type); + ~StaticPlugin(); + virtual bool loadPlugin(); + virtual void unloadPlugin(); +}; + + /** List of Plugin instances. */ typedef Common::Array PluginList;