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);
}
std::list<AttributePtr>::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;