Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sofa.Core] Use links instead of private std::list #2364

Merged
merged 4 commits into from
Oct 13, 2021

Conversation

alxbilger
Copy link
Contributor

A ConstraintCorrection stores the list of constraint solvers using it. This is mainly to notice them to stop using them when they are destroyed (in the cleanup method).
This list was a std::list. I suggest a MultiLink instead.


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@alxbilger alxbilger added pr: clean Cleaning the code pr: status to review To notify reviewers to review this pull-request labels Sep 28, 2021
@fredroy
Copy link
Contributor

fredroy commented Sep 28, 2021

[ci-build][with-all-tests]

@hugtalbot
Copy link
Contributor

hugtalbot commented Sep 29, 2021

👍
Let's just wait the usual 7 days, then it can be ready to me

@hugtalbot hugtalbot added the pr: breaking Change possibly inducing a compilation error label Sep 29, 2021
@fredroy
Copy link
Contributor

fredroy commented Oct 5, 2021

One (new) scene is failing: SceneTests.applications/plugins/LMConstraint/examples.DOFBlockerLMConstraint.scn
The error message is: [ERROR] [UncoupledConstraintCorrection(default67)] Cannot remove the requested constraint solver
It is possible that the scene itself was wrong but it is highlighted here because you add a msg_error()

@hugtalbot hugtalbot added pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request labels Oct 6, 2021
@alxbilger alxbilger added pr: status to review To notify reviewers to review this pull-request and removed pr: status wip Development in the pull-request is still in progress labels Oct 12, 2021
@alxbilger
Copy link
Contributor Author

[ci-build][with-all-tests]

@alxbilger
Copy link
Contributor Author

The error in the tests came from (applications/plugins/LMConstraint/src/LMConstraint/LMConstraintSolver.cpp) in init:

listConstraintCorrection[i]->removeConstraintSolver(this);
listConstraintCorrection[i]->addConstraintSolver(this);

The first line removed the element from the list whereas the element was never added to the list (we are in the init method). It is added in the second line.

@fredroy fredroy added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Oct 13, 2021
@fredroy fredroy merged commit 134cc58 into sofa-framework:master Oct 13, 2021
@guparan guparan added this to the v21.12 milestone Nov 18, 2021
@alxbilger alxbilger deleted the constraintcorrection_links branch June 28, 2022 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: breaking Change possibly inducing a compilation error pr: clean Cleaning the code pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants