From f6e27099b294d55c15a6b5dad13cda7730a17a71 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Wed, 17 Oct 2012 21:55:45 +0200 Subject: Doxygen/comment fixes and some #include refactoring --- src/plugins/pluginloader.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/plugins/pluginloader.cpp') diff --git a/src/plugins/pluginloader.cpp b/src/plugins/pluginloader.cpp index fd8ce74..bd0c8be 100644 --- a/src/plugins/pluginloader.cpp +++ b/src/plugins/pluginloader.cpp @@ -14,10 +14,8 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// pluginloader.cpp - -#include "pluginloader.h" +#include "plugins/pluginloader.h" CPluginLoader::CPluginLoader(std::string filename) @@ -57,7 +55,7 @@ bool CPluginLoader::UnloadPlugin() return true; } - bool (*uninstall)(std::string &) = (bool (*)(std::string &)) lt_dlsym(mHandle, "UninstallPluginEntry"); + bool (*uninstall)(std::string &) = reinterpret_cast( lt_dlsym(mHandle, "UninstallPluginEntry") ); if (!uninstall) { GetLogger()->Error("Error getting UninstallPluginEntry for plugin %s: %s\n", mFilename.c_str(), lt_dlerror()); return false; @@ -88,13 +86,13 @@ bool CPluginLoader::LoadPlugin() return false; } - void (*install)() = (void (*)()) lt_dlsym(mHandle, "InstallPluginEntry"); + void (*install)() = reinterpret_cast( lt_dlsym(mHandle, "InstallPluginEntry") ); if (!install) { GetLogger()->Error("Error getting InstallPluginEntry for plugin %s: %s\n", mFilename.c_str(), lt_dlerror()); return false; } - CPluginInterface* (*getInterface)() = (CPluginInterface* (*)()) lt_dlsym(mHandle, "GetPluginInterfaceEntry"); + CPluginInterface* (*getInterface)() = reinterpret_cast( lt_dlsym(mHandle, "GetPluginInterfaceEntry") ); if (!getInterface) { GetLogger()->Error("Error getting GetPluginInterfaceEntry for plugin %s: %s\n", mFilename.c_str(), lt_dlerror()); -- cgit v1.2.3-1-g7c22