From 7c3165455274bc5a55d8799c4bec8be7450e162e Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 3 Mar 2015 07:18:47 +0100 Subject: [PATCH] Remove the return type for Utility::LoadExtensionLibrary --- lib/base/utility.cpp | 12 ++---------- lib/base/utility.hpp | 8 +------- lib/cli/daemoncommand.cpp | 2 +- lib/config/configcompiler.cpp | 2 +- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp index cd25f988c..543a65bb6 100644 --- a/lib/base/utility.cpp +++ b/lib/base/utility.cpp @@ -299,12 +299,7 @@ void Utility::Sleep(double timeout) * * @param library The name of the library. */ -#ifdef _WIN32 -HMODULE -#else /* _WIN32 */ -void * -#endif /* _WIN32 */ -Utility::LoadExtensionLibrary(const String& library) +void Utility::LoadExtensionLibrary(const String& library) { String path; #if defined(_WIN32) @@ -336,9 +331,6 @@ Utility::LoadExtensionLibrary(const String& library) #endif /* _WIN32 */ ExecuteDeferredInitializers(); - - - return hModule; } boost::thread_specific_ptr > >& Utility::GetDeferredInitializers(void) @@ -1255,4 +1247,4 @@ String Utility::UnescapeString(const String& s) } return result.str(); -} \ No newline at end of file +} diff --git a/lib/base/utility.hpp b/lib/base/utility.hpp index 6409d698e..c1702193e 100644 --- a/lib/base/utility.hpp +++ b/lib/base/utility.hpp @@ -94,13 +94,7 @@ public: static String FormatDateTime(const char *format, double ts); static String FormatErrorNumber(int code); - static -#ifdef _WIN32 - HMODULE -#else /* _WIN32 */ - void * -#endif /* _WIN32 */ - LoadExtensionLibrary(const String& library); + static void LoadExtensionLibrary(const String& library); static void AddDeferredInitializer(const boost::function& callback); static void ExecuteDeferredInitializers(void); diff --git a/lib/cli/daemoncommand.cpp b/lib/cli/daemoncommand.cpp index 4d564b94a..503c83a89 100644 --- a/lib/cli/daemoncommand.cpp +++ b/lib/cli/daemoncommand.cpp @@ -55,7 +55,7 @@ static String LoadAppType(const String& typeSpec) String library = typeSpec.SubStr(0, index); - (void) Utility::LoadExtensionLibrary(library); + Utility::LoadExtensionLibrary(library); return typeSpec.SubStr(index + 1); } diff --git a/lib/config/configcompiler.cpp b/lib/config/configcompiler.cpp index 1ad8fa46e..4eb5766ed 100644 --- a/lib/config/configcompiler.cpp +++ b/lib/config/configcompiler.cpp @@ -171,7 +171,7 @@ Expression *ConfigCompiler::HandleIncludeRecursive(const String& path, const Str */ void ConfigCompiler::HandleLibrary(const String& library) { - (void) Utility::LoadExtensionLibrary(library); + Utility::LoadExtensionLibrary(library); } void ConfigCompiler::CompileHelper(void)