-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Apply [[nodiscard]] to functions returning error codes #953
Conversation
- applied [[nodiscard]] for all HRESULT, LRESULT, and NTSTATUS functions - fixed IntelliSense declaration complaints leading to function not implemented warnings - deleted declared but never implemented functions - fixed unused parameter warnings How verified: - bcz dbg - opencon - testcon - VS2019 debug build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good enough to me. Someone else (@miniksa) might hound you more on casting the HRESULT to void instead of LOG_IF_FAIL
-ing, so I'm gonna let someone else make that call
I've used WIL quite a bit, but never used the LOG_* macros so didn't think of applying them. Unless I hear otherwise, I'll assume that approach in the future, thanks. |
- remove use of goto - make MakeAltRasterFont return void
- remove vestigal function declarations - fix inconsistent function declaration
Hello @miniksa! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Summary of the Pull Request
Functions returning status codes should use [[nodiscard]] as mentioned recently by @adiviness.
They should also use noexcept, but that's a much more invasive change, so this issue is just about [[nodiscard]].
References
#897
PR Checklist
Detailed Description of the Pull Request / Additional comments
implemented warnings
Please note I only checked for functions that had a declaration in a header file of some kind, so there might still be some functions only defined and used within .cpp files that don't have [[nodiscard]] applied.
How verified: