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

Generate mutable reference getters for all members #553

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

tmadlener
Copy link
Collaborator

@tmadlener tmadlener commented Feb 5, 2024

BEGINRELEASENOTES

  • Generate mutable reference getters for all members on the Mutable types

ENDRELEASENOTES

  • tests

@paulgessinger this should be more or less what we discussed today. A minor drawback that I just realized is that for the const versions of these getters we return by value for builtin types rather than by const& (mainly premature optimization I would say). In any case, it shouldn't really matter for you, and I think I am OK with that small inconsistency.

@hegner
Copy link
Collaborator

hegner commented Feb 13, 2024

@tmadlener - add the tests and I can accept :-)

Previously this was only generated for non-builtin (i.e non-trivial)
members. Additionally, deprecate the API that does not respect the
getSyntax option.
@tmadlener
Copy link
Collaborator Author

Done.

@hegner hegner merged commit 93d69cd into AIDASoft:master Feb 15, 2024
16 of 18 checks passed
github-merge-queue bot pushed a commit to eic/EICrecon that referenced this pull request Mar 27, 2024
### Briefly, what does this PR introduce?
This PR changes the direct member access to a getter to avoid a compiler
warning:
```
/home/wdconinc/git/EICrecon/.worktree/pfrich-digitization/src/algorithms/pid/ParticlesWithPID.cc:145:44: warning: 'referencePoint' is deprecated: use getReferencePoint instead [-Wdeprecated-declarations]
  145 |             auto referencePoint = rec_part.referencePoint();
      |                                            ^
/opt/local/include/edm4eic/MutableReconstructedParticle.h:142:5: note: 'referencePoint' has been explicitly marked deprecated here
  142 |   [[deprecated("use getReferencePoint instead")]]
      |     ^
```
This applies since AIDASoft/podio#553.

### What kind of change does this PR introduce?
- [x] Bug fix (issue: deprecated )
- [ ] New feature (issue #__)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
No.
@tmadlener tmadlener deleted the mutable-refs branch April 29, 2024 11:57
ajentsch pushed a commit to eic/EICrecon that referenced this pull request May 20, 2024
### Briefly, what does this PR introduce?
This PR changes the direct member access to a getter to avoid a compiler
warning:
```
/home/wdconinc/git/EICrecon/.worktree/pfrich-digitization/src/algorithms/pid/ParticlesWithPID.cc:145:44: warning: 'referencePoint' is deprecated: use getReferencePoint instead [-Wdeprecated-declarations]
  145 |             auto referencePoint = rec_part.referencePoint();
      |                                            ^
/opt/local/include/edm4eic/MutableReconstructedParticle.h:142:5: note: 'referencePoint' has been explicitly marked deprecated here
  142 |   [[deprecated("use getReferencePoint instead")]]
      |     ^
```
This applies since AIDASoft/podio#553.

### What kind of change does this PR introduce?
- [x] Bug fix (issue: deprecated )
- [ ] New feature (issue #__)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
No.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent reference access for Mutable types
2 participants