mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-06 09:04:17 +05:00
fix compilation on DebianSarge and RedHat
This commit is contained in:
parent
b1618717ff
commit
ab99cd2215
@ -98,9 +98,14 @@ public:
|
|||||||
typename TInterface::_var_type LoadObjectFromStream( std::istream & stream )
|
typename TInterface::_var_type LoadObjectFromStream( std::istream & stream )
|
||||||
{
|
{
|
||||||
if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
|
if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
|
||||||
string str;
|
std::string str;
|
||||||
if (stream >> str)
|
if (stream >> str) {
|
||||||
return gen->GetObjectByOldId< TInterface >( atoi( str.c_str() ));
|
if ( StudyContext* myStudyContext = gen->GetCurrentStudyContext() ) {
|
||||||
|
string ior = myStudyContext->getIORbyOldId( atoi( str.c_str() ));
|
||||||
|
if ( !ior.empty() )
|
||||||
|
return TInterface::_narrow(gen->GetORB()->string_to_object( ior.c_str() ));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return TInterface::_nil();
|
return TInterface::_nil();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user