[Orxonox-commit 1696] r6415 - code/branches/presentation2/src/libraries/core
rgrieder at orxonox.net
rgrieder at orxonox.net
Fri Dec 25 17:18:02 CET 2009
Author: rgrieder
Date: 2009-12-25 17:18:02 +0100 (Fri, 25 Dec 2009)
New Revision: 6415
Modified:
code/branches/presentation2/src/libraries/core/DynLib.cc
Log:
const std::string& or std::string, but std::string& can yield unexpected behaviour.
Modified: code/branches/presentation2/src/libraries/core/DynLib.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/DynLib.cc 2009-12-25 13:07:44 UTC (rev 6414)
+++ code/branches/presentation2/src/libraries/core/DynLib.cc 2009-12-25 16:18:02 UTC (rev 6415)
@@ -69,7 +69,7 @@
// Log library load
COUT(2) << "Loading module " << mName << std::endl;
- std::string& name = mName;
+ std::string name = mName;
#ifdef ORXONOX_PLATFORM_LINUX
// dlopen() does not add .so to the filename, like windows does for .dll
if (name.substr(name.length() - 3, 3) != ".so")
@@ -78,7 +78,7 @@
m_hInst = (DYNLIB_HANDLE)DYNLIB_LOAD( name.c_str() );
- if( !m_hInst )
+ if (!m_hInst)
ThrowException(
General,
"Could not load dynamic library " + mName +
@@ -91,7 +91,7 @@
// Log library unload
COUT(4) << "Unloading module " << mName << std::endl;
- if( DYNLIB_UNLOAD( m_hInst ) )
+ if (DYNLIB_UNLOAD( m_hInst ))
{
ThrowException(
General,
More information about the Orxonox-commit
mailing list