diff options
author | Tony Puccinelli | 2010-08-07 22:27:23 +0000 |
---|---|---|
committer | Tony Puccinelli | 2010-08-07 22:27:23 +0000 |
commit | de1e941370b7e2fad704e072eccfb79b3db1399b (patch) | |
tree | de9301877a963f4688dd919d65cc488510b76ba5 /backends/plugins/ds | |
parent | 68b986545a7ce24e3c0d2a8635d538941b67729f (diff) | |
download | scummvm-rg350-de1e941370b7e2fad704e072eccfb79b3db1399b.tar.gz scummvm-rg350-de1e941370b7e2fad704e072eccfb79b3db1399b.tar.bz2 scummvm-rg350-de1e941370b7e2fad704e072eccfb79b3db1399b.zip |
refined constructors, removed destructors, got rid of unneccessary method duplication in DLObject and its subtypes
svn-id: r51845
Diffstat (limited to 'backends/plugins/ds')
-rw-r--r-- | backends/plugins/ds/ds-provider.cpp | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/backends/plugins/ds/ds-provider.cpp b/backends/plugins/ds/ds-provider.cpp index 66e063f151..7365a2e6e9 100644 --- a/backends/plugins/ds/ds-provider.cpp +++ b/backends/plugins/ds/ds-provider.cpp @@ -32,41 +32,9 @@ class DSPlugin : public ELFPlugin { public: - DSPlugin(const Common::String &filename) { - _dlHandle = 0; - _filename = filename; - } + DSPlugin(const Common::String &filename) : ELFPlugin(filename) {} - ~DSPlugin() { - if (_dlHandle) - unloadPlugin(); - } - - bool loadPlugin(); -}; - -bool DSPlugin::loadPlugin() { - assert(!_dlHandle); - DLObject *obj = new ARMDLObject(); - if (obj->open(_filename.c_str())) { - _dlHandle = obj; - } else { - delete obj; - _dlHandle = NULL; - } - - if (!_dlHandle) { - warning("Failed loading plugin '%s'", _filename.c_str()); - return false; - } - - bool ret = DynamicPlugin::loadPlugin(); - - if (ret && _dlHandle) { - _dlHandle->discard_symtab(); - } - - return ret; + DLObject *makeDLObject() { return new ARMDLObject(); } }; Plugin* DSPluginProvider::createPlugin(const Common::FSNode &node) const { |