diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-11-09 14:22:22 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-11-09 14:23:13 +0100 |
| commit | 77ba4bf960d315ae826f78b786882757bc89ff59 (patch) | |
| tree | cf6bf5194d04b398cfef0004e3b6f72683fea85f /src/qt/walletmodeltransaction.cpp | |
| parent | Merge #10696: Remove redundant nullptr checks before deallocation (diff) | |
| parent | [wallet] Remove CTransaction&() helper conversion operator from wallet implem... (diff) | |
| download | discoin-77ba4bf960d315ae826f78b786882757bc89ff59.tar.xz discoin-77ba4bf960d315ae826f78b786882757bc89ff59.zip | |
Merge #10368: [wallet] Remove helper conversion operator from wallet
5a5e4e9 [wallet] Remove CTransaction&() helper conversion operator from wallet implementation. (Karl-Johan Alm)
Pull request description:
The `CTransaction&()` operator in `CMerkleTx` makes conversion into `CTransaction`s transparent, but was marked as to-be-removed in favor of explicitly getting the `tx` ivar, presumably as the operator can lead to ambiguous behavior and makes the code harder to follow.
This PR removes the operator and adapts callers. This includes some cases of `static_cast<CTransaction>(wtx)` → `*wtx.tx`, which is definitely an improvement.
Tree-SHA512: 95856fec7194d6a79615ea1c322abfcd6bcedf6ffd0cfa89bbdd332ce13035fa52dd4b828d20df673072dde1be64b79c513529a6f422dd5f0961ce722a32d56a
Diffstat (limited to 'src/qt/walletmodeltransaction.cpp')
| -rw-r--r-- | src/qt/walletmodeltransaction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/walletmodeltransaction.cpp b/src/qt/walletmodeltransaction.cpp index eae2c27f8..a2290535c 100644 --- a/src/qt/walletmodeltransaction.cpp +++ b/src/qt/walletmodeltransaction.cpp @@ -34,7 +34,7 @@ CWalletTx *WalletModelTransaction::getTransaction() const unsigned int WalletModelTransaction::getTransactionSize() { - return (!walletTransaction ? 0 : ::GetVirtualTransactionSize(*walletTransaction)); + return (!walletTransaction ? 0 : ::GetVirtualTransactionSize(*walletTransaction->tx)); } CAmount WalletModelTransaction::getTransactionFee() const |