-// Copyright (C) 2017-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
{
if (theCompound->shapeType() == GeomAPI_Shape::COMPOUND) {
GeomAPI_ShapeIterator anIt(theCompound);
- GeomShapePtr aFoundSub;
- for (; anIt.more() && !aFoundSub; anIt.next()) {
- return anIt.current();
- }
+ return anIt.current();
}
return theCompound;
}