Skip to content
Snippets Groups Projects
Commit fb7ab968 authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

[Graph] When initializing graph, clear constraint and complement container.

  - check that a triple of constraint is not registered twice.
parent c4532dcd
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ namespace hpp {
assert(components_.size() >= 1 && components_[0].lock() == wkPtr_.lock());
for (std::size_t i = 1; i < components_.size(); ++i)
components_[i].lock()->initialize();
constraintsAndComplements_.clear ();
isInit_ = true;
}
......@@ -166,6 +167,11 @@ namespace hpp {
const ImplicitPtr_t& complement,
const ImplicitPtr_t& both)
{
for (ConstraintsAndComplements_t::const_iterator it
(constraintsAndComplements_.begin ());
it != constraintsAndComplements_.end (); ++it) {
assert (it->constraint != constraint);
}
constraintsAndComplements_.push_back (ConstraintAndComplement_t
(constraint, complement, both));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment