aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/chain.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-05-11 13:34:01 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-05-11 13:34:07 -0400
commiteb2ffbb7c1347115e6a3d6fa30f909959b6170a5 (patch)
tree468939ea19cdfe96d4b82d42cc09a4b647861103 /src/interfaces/chain.cpp
parentf71a3a8829746cb17fc42c7475cf03229ad6c08e (diff)
parentd044e0ec7d37bbcdf10bbdb903b9119741c7297d (diff)
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 'src/interfaces/chain.cpp')
-rw-r--r--src/interfaces/chain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp
index 515a2ba1b9..e1a528d99c 100644
--- a/src/interfaces/chain.cpp
+++ b/src/interfaces/chain.cpp
@@ -127,7 +127,7 @@ public:
::tableRPC.appendCommand(m_command.name, &m_command);
}
- void disconnect() override final
+ void disconnect() final
{
if (m_wrapped_command) {
m_wrapped_command = nullptr;