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

Refactor pathfinding_settings constructor arguments #37992

Closed
jkraybill opened this issue Feb 13, 2020 · 2 comments
Closed

Refactor pathfinding_settings constructor arguments #37992

jkraybill opened this issue Feb 13, 2020 · 2 comments
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Enhancement / Feature> New features, or enhancements on existing Monsters Monsters both friendly and unfriendly. stale Closed for lack of activity, but still valid.

Comments

@jkraybill
Copy link
Contributor

Is your feature request related to a problem? Please describe.

@codemime made a point in #37964 that the pathfinding_settings constructor which currently has 9 int & boolean arguments could be refactored into explicit assignments or a bitset.

Describe the solution you'd like

Above suggestion seems reasonable.

Describe alternatives you've considered

Not doing anything, or taking a pass at fixing this up in multiple places in the codebase (and maybe making an explicit code style recommendation for future cases like this, if it doesn't exist already).

Additional context

My PR moved this method from 8 args to 9 args, so I didn't a strong case for refactoring as part of that PR, but I agree that long primitive methods can be a little error-prone and hard to read.

@KorGgenT KorGgenT added <Enhancement / Feature> New features, or enhancements on existing [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Monsters Monsters both friendly and unfriendly. labels Mar 5, 2020
@stale
Copy link

stale bot commented Apr 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Apr 4, 2020
@stale
Copy link

stale bot commented May 5, 2020

This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it

@stale stale bot closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Enhancement / Feature> New features, or enhancements on existing Monsters Monsters both friendly and unfriendly. stale Closed for lack of activity, but still valid.
Projects
None yet
Development

No branches or pull requests

2 participants