diff options
author | merge-script <fanquake@gmail.com> | 2024-07-11 19:08:46 +0100 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-07-11 19:08:46 +0100 |
commit | 01dc38bd01b05953585b1b6ec0468ec9d516e9a3 (patch) | |
tree | 3a0f7201400bbf62009be357356da41421ab4f89 /src/rpc | |
parent | c2c0b4f0029957ecd3870fadd62b822f26f3aa7a (diff) | |
parent | 3333bae9b2a6c1ee2314d33361c93944c12001f9 (diff) |
Merge bitcoin/bitcoin#30406: refactor: modernize-use-equals-default
3333bae9b2a6c1ee2314d33361c93944c12001f9 tidy: modernize-use-equals-default (MarcoFalke)
Pull request description:
Prior to C++20, `modernize-use-equals-default` could have been problematic because it could turn a non-aggregate into an aggregate. The risk would be that aggregate initialization would be enabled where the author did not intend to enable it.
With C++20, aggregate for those is forbidden either way. (https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1008r1.pdf)
So enabled it for code clarity, consistency, and possibly unlocking compiler optimizations. See https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html
ACKs for top commit:
stickies-v:
ACK 3333bae9b2a6c1ee2314d33361c93944c12001f9
Tree-SHA512: ab42ff01be7ca7e7d8b4c6a485e68426f59627d83dd827cf292304829562348dc17a52ee009f5f6f3c1c2081d7166ffac4baef23197ebeba8de7767c6ddfe255
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/server.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/server.h b/src/rpc/server.h index 5735aff821..56e8a63088 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -48,7 +48,7 @@ bool RPCIsInWarmup(std::string *outStatus); class RPCTimerBase { public: - virtual ~RPCTimerBase() {} + virtual ~RPCTimerBase() = default; }; /** @@ -57,7 +57,7 @@ public: class RPCTimerInterface { public: - virtual ~RPCTimerInterface() {} + virtual ~RPCTimerInterface() = default; /** Implementation name */ virtual const char *Name() = 0; /** Factory function for timers. |