diff options
| author | Andre Heider | 2010-09-05 12:39:28 +0000 |
|---|---|---|
| committer | Andre Heider | 2010-09-05 12:39:28 +0000 |
| commit | 5986aa96f2d8f06c1a54be614f483712e7d4d8f0 (patch) | |
| tree | fc24526bf3269ad7afd12bb6ded873f9157bd76b /backends/plugins/elf-provider.cpp | |
| parent | c5a189f4d5f5a9f94b7e063077ba0ee5aaf1a788 (diff) | |
| download | scummvm-rg350-5986aa96f2d8f06c1a54be614f483712e7d4d8f0.tar.gz scummvm-rg350-5986aa96f2d8f06c1a54be614f483712e7d4d8f0.tar.bz2 scummvm-rg350-5986aa96f2d8f06c1a54be614f483712e7d4d8f0.zip | |
PLUGINS: Formatting.
svn-id: r52552
Diffstat (limited to 'backends/plugins/elf-provider.cpp')
| -rw-r--r-- | backends/plugins/elf-provider.cpp | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/backends/plugins/elf-provider.cpp b/backends/plugins/elf-provider.cpp index 00d93fcd34..997a43b653 100644 --- a/backends/plugins/elf-provider.cpp +++ b/backends/plugins/elf-provider.cpp @@ -54,27 +54,26 @@ DynamicPlugin::VoidFunc ELFPlugin::findSymbol(const char *symbol) { } bool ELFPlugin::loadPlugin() { - assert(!_dlHandle); - DLObject *obj = makeDLObject(); - if (obj->open(_filename.c_str())) { - _dlHandle = obj; - } else { - delete obj; - _dlHandle = 0; - } + assert(!_dlHandle); + DLObject *obj = makeDLObject(); + if (obj->open(_filename.c_str())) { + _dlHandle = obj; + } else { + delete obj; + _dlHandle = 0; + } - if (!_dlHandle) { - warning("elfloader: Failed loading plugin '%s'", _filename.c_str()); - return false; - } + if (!_dlHandle) { + warning("elfloader: Failed loading plugin '%s'", _filename.c_str()); + return false; + } - bool ret = DynamicPlugin::loadPlugin(); + bool ret = DynamicPlugin::loadPlugin(); - if (ret && _dlHandle) { - _dlHandle->discard_symtab(); - } + if (ret && _dlHandle) + _dlHandle->discard_symtab(); - return ret; + return ret; } void ELFPlugin::unloadPlugin() { @@ -91,9 +90,9 @@ void ELFPlugin::unloadPlugin() { bool ELFPluginProvider::isPluginFilename(const Common::FSNode &node) const { // Check the plugin suffix Common::String filename = node.getName(); - if (!filename.hasSuffix(".PLG") && !filename.hasSuffix(".plg") && !filename.hasSuffix(".PLUGIN") && !filename.hasSuffix(".plugin")) { + if (!filename.hasSuffix(".PLG") && !filename.hasSuffix(".plg") && !filename.hasSuffix(".PLUGIN") && !filename.hasSuffix(".plugin")) return false; - } + return true; } |
