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

Monte Carlo: inconsistent usage of rpacket accessor functions and members #388

Closed
mreineck opened this issue Aug 20, 2015 · 3 comments
Closed

Comments

@mreineck
Copy link
Contributor

The rpacket struct has a complete set of getter and setter functions, but in several places throughout cmontecarlo.c, its members are accessed directly (just grep for "packet." or "packet->" in this file).
It would be nice to harmonize this and either use only accessors or remove them.
Since the current accessor functions don't try to preserve any kind of invariant, both solutions are equivalent from a correctness view. Personally I consider direct access to the data member more readable.
I'm happy to provide patches for either solution.

@orbitfold
Copy link
Contributor

I'm for keeping accessors, I find accessor code more readable.

@orbitfold orbitfold reopened this Aug 20, 2015
@mreineck
Copy link
Contributor Author

OK, I'll provide a PR shortly.

orbitfold added a commit that referenced this issue Aug 21, 2015
@mreineck
Copy link
Contributor Author

Fixed.

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

No branches or pull requests

2 participants