diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-05-11 13:34:01 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-05-11 13:34:07 -0400 |
commit | eb2ffbb7c1347115e6a3d6fa30f909959b6170a5 (patch) | |
tree | 468939ea19cdfe96d4b82d42cc09a4b647861103 /test | |
parent | f71a3a8829746cb17fc42c7475cf03229ad6c08e (diff) | |
parent | d044e0ec7d37bbcdf10bbdb903b9119741c7297d (diff) | |
download | bitcoin-eb2ffbb7c1347115e6a3d6fa30f909959b6170a5.tar.xz |
Merge #18914: refactor: Apply override specifier consistently
d044e0ec7d37bbcdf10bbdb903b9119741c7297d refactor: Remove override for final overriders (Hennadii Stepanov)
1551cea2d52cac403ff506a7cc955d8de8fd6f3e refactor: Use override for non-final overriders (Hennadii Stepanov)
Pull request description:
Two commits are split out from #16710 to make reviewing [easier](https://github.com/bitcoin/bitcoin/pull/16710#issuecomment-625760894).
From [C++ FAQ](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines.html#c128-virtual-functions-should-specify-exactly-one-of-virtual-override-or-final):
> C.128: Virtual functions should specify exactly one of virtual, override, or final
> **Reason** Readability. Detection of mistakes. Writing explicit `virtual`, `override`, or `final` is self-documenting and enables the compiler to catch mismatch of types and/or names between base and derived classes. However, writing more than one of these three is both redundant and a potential source of errors.
ACKs for top commit:
practicalswift:
ACK d044e0ec7d37bbcdf10bbdb903b9119741c7297d: consistent use of `override` prevents bugs + patch looks correct + Travis happy
MarcoFalke:
ACK d044e0ec7d37bbcdf10bbdb903b9119741c7297d, based on my understanding that adding `override` or `final` to a function must always be correct, unless it doesn't compile!?
vasild:
ACK d044e0ec7
Tree-SHA512: 245fd9b99b8b5cbf8694061f892cb3435f3378c97ebed9f9401ce86d21890211f2234bcc39c9f0f79a4d2806cb31bf8ce41a0f9c2acef4f3a2ac5beca6b077cf
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions