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

[All] Remove last deprecated VecId and use constexpr vecids #5211

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

fredroy
Copy link
Contributor

@fredroy fredroy commented Jan 10, 2025

Not done with Find/Replace dumbly because some functions were using the "write" access when they need a read access only.


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).

@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code labels Jan 10, 2025
@fredroy
Copy link
Contributor Author

fredroy commented Jan 10, 2025

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

@fredroy fredroy force-pushed the convert_constexpr_vecid branch from f7ba04d to a981fd7 Compare January 10, 2025 06:48
@@ -1032,7 +1032,7 @@ void MechanicalObject<DataTypes>::init()
//case if X0 has been set but not X
if (read(core::vec_id::read_access::restPosition)->getValue().size() > x_wA.size())
{
vOp(core::execparams::defaultInstance(), core::VecId::position(), core::VecId::restPosition());
vOp(core::execparams::defaultInstance(), sofa::core::vec_id::write_access::position, sofa::core::vec_id::read_access::restPosition);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One is write and the other one is read, is that correct (seem right to me, we don't want to override the restPosition, but I prefer asking)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

virtual void vOp(const ExecParams* params, VecId v,

first vecid is writable, next ones are read-only vecid

@fredroy fredroy force-pushed the convert_constexpr_vecid branch from 86ffe66 to 5de59d1 Compare January 21, 2025 00:49
@fredroy fredroy force-pushed the convert_constexpr_vecid branch from 5de59d1 to 151faaa Compare January 22, 2025 06:57
@hugtalbot hugtalbot 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 Jan 22, 2025
@hugtalbot hugtalbot merged commit 53f78ec into sofa-framework:master Jan 22, 2025
15 checks passed
@hugtalbot hugtalbot deleted the convert_constexpr_vecid branch January 22, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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