mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 18:22:57 +02:00
clang-tidy: Fix modernize-use-default-member-init in headers
See https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-default-member-init.html
This commit is contained in:
@@ -308,7 +308,7 @@ BerkeleyDatabase::~BerkeleyDatabase()
|
||||
}
|
||||
}
|
||||
|
||||
BerkeleyBatch::BerkeleyBatch(BerkeleyDatabase& database, const bool read_only, bool fFlushOnCloseIn) : pdb(nullptr), activeTxn(nullptr), m_database(database)
|
||||
BerkeleyBatch::BerkeleyBatch(BerkeleyDatabase& database, const bool read_only, bool fFlushOnCloseIn) : m_database(database)
|
||||
{
|
||||
database.AddRef();
|
||||
database.Open();
|
||||
|
||||
@@ -207,9 +207,9 @@ private:
|
||||
bool HasKey(DataStream&& key) override;
|
||||
|
||||
protected:
|
||||
Db* pdb;
|
||||
Db* pdb{nullptr};
|
||||
std::string strFile;
|
||||
DbTxn* activeTxn;
|
||||
DbTxn* activeTxn{nullptr};
|
||||
bool fReadOnly;
|
||||
bool fFlushOnClose;
|
||||
BerkeleyEnvironment *env;
|
||||
|
||||
@@ -123,7 +123,7 @@ class WalletDatabase
|
||||
{
|
||||
public:
|
||||
/** Create dummy DB handle */
|
||||
WalletDatabase() : nUpdateCounter(0), nLastSeen(0), nLastFlushed(0), nLastWalletUpdate(0) {}
|
||||
WalletDatabase() : nUpdateCounter(0) {}
|
||||
virtual ~WalletDatabase() {};
|
||||
|
||||
/** Open the database if it is not already opened. */
|
||||
@@ -165,9 +165,9 @@ public:
|
||||
virtual std::string Format() = 0;
|
||||
|
||||
std::atomic<unsigned int> nUpdateCounter;
|
||||
unsigned int nLastSeen;
|
||||
unsigned int nLastFlushed;
|
||||
int64_t nLastWalletUpdate;
|
||||
unsigned int nLastSeen{0};
|
||||
unsigned int nLastFlushed{0};
|
||||
int64_t nLastWalletUpdate{0};
|
||||
|
||||
/** Make a DatabaseBatch connected to this database */
|
||||
virtual std::unique_ptr<DatabaseBatch> MakeBatch(bool flush_on_close = true) = 0;
|
||||
|
||||
@@ -954,10 +954,10 @@ private:
|
||||
using Clock = std::chrono::steady_clock;
|
||||
using NowFn = std::function<Clock::time_point()>;
|
||||
CWallet& m_wallet;
|
||||
bool m_could_reserve;
|
||||
bool m_could_reserve{false};
|
||||
NowFn m_now;
|
||||
public:
|
||||
explicit WalletRescanReserver(CWallet& w) : m_wallet(w), m_could_reserve(false) {}
|
||||
explicit WalletRescanReserver(CWallet& w) : m_wallet(w) {}
|
||||
|
||||
bool reserve()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user