File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -443,17 +443,21 @@ ConstraintSystem::SolverState::~SolverState() {
443
443
if (constraint->isActive ())
444
444
continue ;
445
445
446
+ #ifndef NDEBUG
446
447
// Make sure that constraint is present in the "inactive" set
447
448
// before transferring it to "active".
448
449
auto existing = llvm::find_if (CS.InactiveConstraints ,
449
450
[&constraint](const Constraint &inactive) {
450
451
return &inactive == constraint;
451
452
});
452
- assert (existing != CS.InactiveConstraints .end ());
453
+ assert (existing != CS.InactiveConstraints .end () &&
454
+ " All constraints should be present in 'inactive' list" );
455
+ #endif
453
456
454
457
// Transfer the constraint to "active" set.
455
- CS.InactiveConstraints .erase (existing);
456
- CS.ActiveConstraints .push_back (constraint);
458
+ CS.ActiveConstraints .splice (CS.ActiveConstraints .end (),
459
+ CS.InactiveConstraints , constraint);
460
+
457
461
constraint->setActive (true );
458
462
}
459
463
You can’t perform that action at this time.
0 commit comments