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

[REF] Ensure the [[nodiscard]], [[maybe_unused]] or any other specifiers are used when possible #171

Closed
AndreasLrx opened this issue Oct 17, 2024 · 0 comments · Fixed by #172
Assignees
Labels
enhancement New feature or request refactor Code rework

Comments

@AndreasLrx
Copy link
Owner

Describe the request

  • Every getter should be [[nodiscard]], and also any method which doesn't change the object itself but returns a value instead
  • Unused function parameters (for example in virtual method) should be [[maybe_unused]]
  • Functions must have noexcept if possible.

Describe the needs

This will allow some compilers optimization as long as a better code comprehension/coherence.

It should have been written since the beginning of the project but I wasn't aware of these specifiers at the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Code rework
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant