-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
if(aShape->shapeType() == GeomAPI_Shape::COMPOUND) {
for(GeomAPI_ShapeIterator anIt(aShape); anIt.more(); anIt.next()) {
GeomShapePtr aSubShape = anIt.current();
- if(aSubShape->shapeType() != GeomAPI_Shape::VERTEX
- && aSubShape->shapeType() != GeomAPI_Shape::EDGE
- && aSubShape->shapeType() != GeomAPI_Shape::FACE) {
+ if (aSubShape->shapeType() > GeomAPI_Shape::VERTEX ||
+ aSubShape->shapeType() < GeomAPI_Shape::FACE) {
theError = "Error: Compound should contain only faces, edges or vertices.";
return false;
}