-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Declare de facto const reference variables/member functions as const #20584
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
Declare de facto const reference variables/member functions as const #20584
Conversation
jonatack
left a comment
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.
ACK 31b136e
|
🕵️ @sipa has been requested to review this pull request as specified in the REVIEWERS file. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
theStack
left a comment
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.
ACK 31b136e ❄️
|
ACK 31b136e Don't double negatives? ("Declare de facto const reference variables/member functions as const" -- might be worth updating the PR title at least if you don't need to invalidate acks for some other reason) |
Summary: This is a backport of [[bitcoin/bitcoin#20584 | core#20584]] Note: in net.h, `InactivityCheck` was already `const`ed in D10874 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D11095
Meta: This is the second and final part of the
constrefactoring series (part one: #20581). I promise: no more refactoring PRs from me in a while! :) I'll now go back to focusing on fuzzing/hardening!Changes in this PR:
Awards for finding candidates for the above changes go to:
clang-tidy'sreadability-make-member-function-constcheck (list ofclang-tidychecks)cppcheck'sconstVariablecheck (list ofcppcheckchecks)See #18920 for instructions on how to analyse Bitcoin Core using Clang Static Analysis,
clang-tidyandcppcheck.