[Scummvm-cvs-logs] SF.net SVN: scummvm:[51765] scummvm/branches/gsoc2010-plugins/backends/ plugins/elf-provider.cpp
toneman1138 at users.sourceforge.net
toneman1138 at users.sourceforge.net
Thu Aug 5 22:54:48 CEST 2010
Revision: 51765
http://scummvm.svn.sourceforge.net/scummvm/?rev=51765&view=rev
Author: toneman1138
Date: 2010-08-05 20:54:48 +0000 (Thu, 05 Aug 2010)
Log Message:
-----------
dealt with FIXME comments: removing superfluous checks, printfs, etc.
Modified Paths:
--------------
scummvm/branches/gsoc2010-plugins/backends/plugins/elf-provider.cpp
Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf-provider.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf-provider.cpp 2010-08-05 20:32:18 UTC (rev 51764)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf-provider.cpp 2010-08-05 20:54:48 UTC (rev 51765)
@@ -99,15 +99,9 @@
void unloadPlugin() {
DynamicPlugin::unloadPlugin();
if (_dlHandle) {
- if (_dlHandle == NULL) {
- // FIXME: This check makes no sense, _dlHandle cannot be NULL at this point
- warning("Failed unloading plugin '%s' (Handle is NULL)", _filename.c_str());
- } else if (_dlHandle->close()) {
- delete _dlHandle;
- } else {
+ delete _dlHandle;
+ if (!_dlHandle->close()) {
warning("Failed unloading plugin '%s'", _filename.c_str());
- // FIXME: We are leaking _dlHandle here!
- // Any particular reasons why we would want to do that???
}
_dlHandle = 0;
}
@@ -121,15 +115,10 @@
bool ELFPluginProvider::isPluginFilename(const Common::FSNode &node) const {
// Check the plugin suffix
- // FIXME: Do we need these printfs? Should get rid of them eventually.
Common::String filename = node.getName();
- printf("Testing name %s", filename.c_str());
if (!filename.hasSuffix(".PLG") && !filename.hasSuffix(".plg") && !filename.hasSuffix(".PLUGIN") && !filename.hasSuffix(".plugin")) {
- printf(" fail.\n");
return false;
}
-
- printf(" success!\n");
return true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list