X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FPlugins.cxx;h=c114404b1e332602749ebca4f24f045120e0c20c;hb=211cd32b53b9739923f6c5135a704ce1852deca1;hp=260172e467c41e1b0d93ca5a1d0d6d419189aaa7;hpb=1f5c3516bf4240bcdd91979ac303298ef1f75fc3;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Plugins.cxx b/lib/cpPlugins/Interface/Plugins.cxx index 260172e..c114404 100644 --- a/lib/cpPlugins/Interface/Plugins.cxx +++ b/lib/cpPlugins/Interface/Plugins.cxx @@ -127,15 +127,15 @@ LoadEnvironments( ) { if( fname.substr( pos ) == ext ) { - std::regex re( lib ); -std::smatch match; -if( std::regex_search( fname, match, re ) && match.size( ) >= 1 ) - { - std::stringstream str; - str - << pth << cpPlugins_PATH_SEPARATOR << fname; - libs.insert( str.str( ) ); - } // fi + std::regex re( lib ); + std::smatch match; + if( std::regex_search( fname, match, re ) && match.size( ) >= 1 ) + { + std::stringstream str; + str + << pth << cpPlugins_PATH_SEPARATOR << fname; + libs.insert( str.str( ) ); + } // fi } // fi @@ -169,13 +169,13 @@ if( std::regex_search( fname, match, re ) && match.size( ) >= 1 ) if( lib != "" ) { if( this->m_Libraries.find( lib ) == this->m_Libraries.end( ) ) -{ - std::string error = ""; - void* hnd = cpPlugins::OS::DLLManager::Load( lib, error ); - if( hnd != NULL ) - this->m_Libraries[ lib ] = hnd; + { + std::string error = ""; + void* hnd = cpPlugins::OS::DLLManager::Load( lib, error ); + if( hnd != NULL ) + this->m_Libraries[ lib ] = hnd; -} // fi + } // fi } // fi @@ -191,16 +191,16 @@ LoadPaths( const std::string& dir ) if( !cpExtensions::IsPathSeparator( dir.back( ) ) ) fname << cpExtensions_PATH_SEPARATOR; fname << cpPlugins_PATHS; - std::string buffer; - if( cpExtensions::Read( buffer, fname.str( ) ) ) - { - std::istringstream input( buffer ); - for( std::string line; std::getline( input, line ); ) - envs << line << cpPlugins_ENV_SEPARATOR; + std::string buffer; + if( cpExtensions::Read( buffer, fname.str( ) ) ) + { + std::istringstream input( buffer ); + for( std::string line; std::getline( input, line ); ) + envs << line << cpPlugins_ENV_SEPARATOR; - } // fi - if( envs.str( ).size( ) > 0 ) - this->AddEnvironments( envs.str( ) ); + } // fi + if( envs.str( ).size( ) > 0 ) + this->AddEnvironments( envs.str( ) ); } // -------------------------------------------------------------------------