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

[REQ] Replace use of no action values with C++17 std::optional #2269

Closed
drmason789 opened this issue Apr 2, 2024 · 3 comments
Closed

[REQ] Replace use of no action values with C++17 std::optional #2269

drmason789 opened this issue Apr 2, 2024 · 3 comments
Labels
wontfix This will not be worked on
Milestone

Comments

@drmason789
Copy link
Contributor

drmason789 commented Apr 2, 2024

and use resistanceRequest.has_value() and resistanceRequest.reset() instead of having a "no action constant". If you are agreeable, I will do this for the resistance, inclination and power requests, in a different PR.

yes sure! thanks!

Originally posted by @cagnulein in #2174 (comment)

@drmason789 drmason789 changed the title [REQ} Replace use of no action values with C++17 std::optional [REQ] Replace use of no action values with C++17 std::optional Apr 2, 2024
@drmason789
Copy link
Contributor Author

I've volunteered to do this.

For each varname that's optional

  • replace comparisons with the "no value" value with varname.has_value()
  • replace comparisons with other values with varname.value()
  • use varname.value_or(...) where possible
  • replace assignment of the "no value" value with varname.reset()

Copy link

stale bot commented Apr 20, 2024

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.

@stale stale bot added the wontfix This will not be worked on label Apr 20, 2024
@stale stale bot closed this as completed Apr 28, 2024
@cagnulein cagnulein reopened this Apr 28, 2024
@stale stale bot removed the wontfix This will not be worked on label Apr 28, 2024
Copy link

stale bot commented May 13, 2024

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.

@stale stale bot added the wontfix This will not be worked on label May 13, 2024
@stale stale bot closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants