mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 02:02:42 +02:00
Merge bitcoin/bitcoin#30406: refactor: modernize-use-equals-default
3333bae9b2tidy: 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: ACK3333bae9b2Tree-SHA512: ab42ff01be7ca7e7d8b4c6a485e68426f59627d83dd827cf292304829562348dc17a52ee009f5f6f3c1c2081d7166ffac4baef23197ebeba8de7767c6ddfe255
This commit is contained in:
@@ -678,7 +678,7 @@ struct error
|
||||
class Buffer
|
||||
{
|
||||
public:
|
||||
Buffer() {}
|
||||
Buffer() = default;
|
||||
explicit Buffer(size_t cap) { buf.resize(cap); }
|
||||
void add_cap(size_t cap) { buf.resize(cap); }
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace util {
|
||||
class TaskRunnerInterface
|
||||
{
|
||||
public:
|
||||
virtual ~TaskRunnerInterface() {}
|
||||
virtual ~TaskRunnerInterface() = default;
|
||||
|
||||
/**
|
||||
* The callback can either be queued for later/asynchronous/threaded
|
||||
|
||||
Reference in New Issue
Block a user