You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: