X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomValidators%2FGeomValidators_Different.cpp;h=94c369c5a516f796d1c6f4f8fe9023901ddd3a25;hb=4fc2dc9fdc0c14fab5f2780598eccdc1368d81b9;hp=45de46f7dd605339a99fb8b051036bb28e2032ee;hpb=e074e769a363f00ed7e4fb1ddcb3d05081f84358;p=modules%2Fshaper.git diff --git a/src/GeomValidators/GeomValidators_Different.cpp b/src/GeomValidators/GeomValidators_Different.cpp index 45de46f7d..94c369c5a 100644 --- a/src/GeomValidators/GeomValidators_Different.cpp +++ b/src/GeomValidators/GeomValidators_Different.cpp @@ -37,10 +37,16 @@ bool isEqualAttributes(const AttributePtr& theLeft, const AttributePtr& theRight return false; } +/** \class IsEqual + * \ingroup Validators + * \brief Auxiliary class used in std::find_if + */ class IsEqual { AttributePtr myAttribute; public: + /// Constructor IsEqual(const AttributePtr& theAttribute) : myAttribute(theAttribute) {} + /// \return true in case if AttributePtr is equal with myAttribute bool operator()(const AttributePtr& theAttribute) { return isEqualAttributes(myAttribute, theAttribute); } @@ -72,7 +78,7 @@ bool GeomValidators_Different::isValid(const std::shared_ptr& std::list::const_iterator aFindIt = std::find_if(aNextIt, anAttributes.end(), IsEqual(*anAttributeIt)); if (aFindIt != anAttributes.end()) { - theError = "Attributes " + anAttributeIt->id() + " and " + aFindIt->id() + " are equal." ; + theError = "Attributes " + (*anAttributeIt)->id() + " and " + (*aFindIt)->id() + " are equal." ; return false; } ++anAttributeIt;