diff options
author | w0xlt <94266259+w0xlt@users.noreply.github.com> | 2022-02-18 15:45:53 -0300 |
---|---|---|
committer | w0xlt <94266259+w0xlt@users.noreply.github.com> | 2022-04-13 12:24:37 -0300 |
commit | 343f83d0886ae39c9dacb29762ce712711b2bad2 (patch) | |
tree | 559f388cc6c7bc54c7aa4e884ba9b4ba88f4f7b1 /src | |
parent | 66d58ad7a99a98b5e78fd97ddf777ea00e6091cf (diff) |
qt, refactor: Use member initializers in TransactionStatus
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/transactionrecord.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h index 2898a2739e..d8748d7dc9 100644 --- a/src/qt/transactionrecord.h +++ b/src/qt/transactionrecord.h @@ -20,13 +20,7 @@ struct WalletTxStatus; /** UI model for transaction status. The transaction status is the part of a transaction that will change over time. */ -class TransactionStatus -{ -public: - TransactionStatus() : countsForBalance(false), sortKey(""), - matures_in(0), status(Unconfirmed), depth(0), open_for(0) - { } - +struct TransactionStatus { enum Status { Confirmed, /**< Have 6 or more confirmations (normal tx) or fully mature (mined tx) **/ /// Normal (sent/received) transactions @@ -40,25 +34,25 @@ public: }; /// Transaction counts towards available balance - bool countsForBalance; + bool countsForBalance{false}; /// Sorting key based on status std::string sortKey; /** @name Generated (mined) transactions @{*/ - int matures_in; + int matures_in{0}; /**@}*/ /** @name Reported status @{*/ - Status status; - qint64 depth; + Status status{Unconfirmed}; + qint64 depth{0}; /**@}*/ /** Current block hash (to know whether cached status is still valid) */ uint256 m_cur_block_hash{}; - bool needsUpdate; + bool needsUpdate{false}; }; /** UI model for a transaction. A core transaction can be represented by multiple UI transactions if it has |