- if ( ! mesh->_is_nil() )
- res = (mesh->NbNodes() > 0);
-
- SMESH::SMESH_subMesh_var aSubMeshObj = SMESH::SMESH_subMesh::_narrow( anObj );
- if ( !aSubMeshObj->_is_nil() )
- res = (aSubMeshObj->GetNumberOfNodes(true) > 0);
-
- SMESH::SMESH_GroupBase_var aGroupObj = SMESH::SMESH_GroupBase::_narrow( anObj );
- if ( !aGroupObj->_is_nil() )
- res = !aGroupObj->IsEmpty();
- }*/
- if( !CORBA::is_nil( anObj ) ) {
- if(!SMESH::SMESH_Mesh::_narrow( anObj )->_is_nil() ||
- !SMESH::SMESH_subMesh::_narrow( anObj )->_is_nil() ||
- !SMESH::SMESH_GroupBase::_narrow( anObj )->_is_nil())
- res = true;
+ if ( ! ( res = !mesh->_is_nil() ))
+ {
+ SMESH::SMESH_subMesh_var aSubMeshObj = SMESH::SMESH_subMesh::_narrow( anObj );
+ if ( ! ( res = !aSubMeshObj->_is_nil() ))
+ {
+ SMESH::SMESH_GroupBase_var aGroupObj = SMESH::SMESH_GroupBase::_narrow( anObj );
+ res = !aGroupObj->_is_nil();
+ }
+ }