Meta: This is the second and final part of the const refactoring 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:
- Don't declare de facto const member functions as non-const
- Don't declare de facto const reference variables as non-const
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-tidy and cppcheck.