From: Vadim Zeitlin Date: Sat, 2 Aug 2003 22:47:40 +0000 (+0000) Subject: minor changes to eliminate unused parameter warning + some cleanup X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/350fffae72c078442d6d177d2071e62f2687df9f minor changes to eliminate unused parameter warning + some cleanup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 234406e898..989138706e 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -391,17 +391,39 @@ void *wxDynamicLibrary::GetSymbol(const wxString &name, bool *success) const /*static*/ -wxString wxDynamicLibrary::CanonicalizeName(const wxString& name, - wxDynamicLibraryCategory cat) +wxString +wxDynamicLibrary::CanonicalizeName(const wxString& name, + wxDynamicLibraryCategory +#ifdef __UNIX__ + cat +#else // !__UNIX__ + WXUNUSED(cat) +#endif // __UNIX__/!__UNIX__ + ) { + wxString nameCanonic; + + // under Unix the library names usualyl start with "lib" prefix, add it #ifdef __UNIX__ - if ( cat == wxDL_MODULE ) - return name + GetDllExt(); - else - return wxString(_T("lib")) + name + GetDllExt(); -#else - return name + GetDllExt(); -#endif + switch ( cat ) + { + default: + wxFAIL_MSG( _T("unknown wxDynamicLibraryCategory value") ); + // fall through + + case wxDL_MODULE: + // don't do anything for modules, their names are arbitrary + break; + + case wxDL_LIBRARY: + // library names should start with "lib" under Unix + nameCanonic = _T("lib"); + break; + } +#endif // __UNIX__ + + nameCanonic << name << GetDllExt(); + return nameCanonic; } /*static*/ @@ -440,6 +462,7 @@ wxString wxDynamicLibrary::CanonicalizePluginName(const wxString& name, #define wxDLLVER(x,y,z) #x #y #z #endif #endif + suffix << wxString::FromAscii(wxDLLVER(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)); #undef wxDLLVER