Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6415


Ignore:
Timestamp:
Dec 25, 2009, 5:18:02 PM (15 years ago)
Author:
rgrieder
Message:

const std::string& or std::string, but std::string& can yield unexpected behaviour.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/DynLib.cc

    r6413 r6415  
    7070        COUT(2) << "Loading module " << mName << std::endl;
    7171
    72         std::string& name = mName;
     72        std::string name = mName;
    7373#ifdef ORXONOX_PLATFORM_LINUX
    7474        // dlopen() does not add .so to the filename, like windows does for .dll
     
    7979        m_hInst = (DYNLIB_HANDLE)DYNLIB_LOAD( name.c_str() );
    8080
    81         if( !m_hInst )
     81        if (!m_hInst)
    8282            ThrowException(
    8383                General,
     
    9292        COUT(4) << "Unloading module " << mName << std::endl;
    9393
    94         if( DYNLIB_UNLOAD( m_hInst ) )
     94        if (DYNLIB_UNLOAD( m_hInst ))
    9595        {
    9696            ThrowException(
Note: See TracChangeset for help on using the changeset viewer.