diff options
author | fanquake <fanquake@gmail.com> | 2022-05-11 16:02:15 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-05-17 17:18:58 +0100 |
commit | 7aa40f55636be565441a9e0af8de0a346bfa4da2 (patch) | |
tree | cec851bcb9c00ea0d37da6b96cc5c65f2366862a /src/rpc | |
parent | d5d40d59f8d12cf53c5ad1ce9710f3f108cec386 (diff) |
refactor: use C++11 default initializers
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/blockchain.cpp | 4 | ||||
-rw-r--r-- | src/rpc/mining.cpp | 4 | ||||
-rw-r--r-- | src/rpc/util.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index daf94afc31..0715ceae97 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1948,9 +1948,9 @@ static std::atomic<bool> g_should_abort_scan; class CoinsViewScanReserver { private: - bool m_could_reserve; + bool m_could_reserve{false}; public: - explicit CoinsViewScanReserver() : m_could_reserve(false) {} + explicit CoinsViewScanReserver() = default; bool reserve() { CHECK_NONFATAL(!m_could_reserve); diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 568474fcb9..2b8bd01c07 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -930,10 +930,10 @@ class submitblock_StateCatcher final : public CValidationInterface { public: uint256 hash; - bool found; + bool found{false}; BlockValidationState state; - explicit submitblock_StateCatcher(const uint256 &hashIn) : hash(hashIn), found(false), state() {} + explicit submitblock_StateCatcher(const uint256 &hashIn) : hash(hashIn), state() {} protected: void BlockChecked(const CBlock& block, const BlockValidationState& stateIn) override { diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index ef3e58494e..a5f5494259 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -267,7 +267,7 @@ CTxDestination AddAndGetMultisigDestination(const int required, const std::vecto class DescribeAddressVisitor { public: - explicit DescribeAddressVisitor() {} + explicit DescribeAddressVisitor() = default; UniValue operator()(const CNoDestination& dest) const { |