-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
for(; aChildItr.More(); aChildItr.Next())
aList.push_back(aChildItr.Value());
- for(int i = 0, len = aList.size(); i<len; i++) {
+ for(size_t i = 0, len = aList.size(); i<len; i++) {
if(aList[i]->Label() == aCurrent) { //The current node is removed
aRef->Set(_root->Label()); //Reset the current node to the root
}
if ( index < 0 )
{
SALOMEDSImpl_AttributeTreeNode* Last = aFather->GetFirst();
- for ( index = 0; Last && Last->HasNext(); ++index )
+ for ( index = 0; Last && aNode != Last && Last->HasNext(); ++index )
{
Last = Last->GetNext();
- if ( aNode == Last )
- break;
}
if ( Last != aNode )
index = -1;