diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-09-10 16:23:41 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-09-12 23:38:20 +0200 |
commit | 973d8ba93d0fa00bed4569287e32696300036ab8 (patch) | |
tree | 8d573f6d1c4473796917c2f3d2d7d4eea4d984e2 /src/wallet | |
parent | 65ed198295e58cf1bc339aa17349b83490872f70 (diff) |
wallet: refactor: inline function WriteOrderPos()
Since accounts were removed in commit c9c32e6b844fc79467b7e24c6c916142a0d08484,
this function is only called at one place and thus can be as well inlined.
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/transaction.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/wallet/transaction.h b/src/wallet/transaction.h index 997b77c8db..33cf667cd8 100644 --- a/src/wallet/transaction.h +++ b/src/wallet/transaction.h @@ -19,14 +19,6 @@ typedef std::map<std::string, std::string> mapValue_t; - -static inline void WriteOrderPos(const int64_t& nOrderPos, mapValue_t& mapValue) -{ - if (nOrderPos == -1) - return; - mapValue["n"] = ToString(nOrderPos); -} - /** Legacy class used for deserializing vtxPrev for backwards compatibility. * vtxPrev was removed in commit 93a18a3650292afbb441a47d1fa1b94aeb0164e3, * but old wallet.dat files may still contain vtxPrev vectors of CMerkleTxs. @@ -181,7 +173,9 @@ public: mapValue_t mapValueCopy = mapValue; mapValueCopy["fromaccount"] = ""; - WriteOrderPos(nOrderPos, mapValueCopy); + if (nOrderPos != -1) { + mapValueCopy["n"] = ToString(nOrderPos); + } if (nTimeSmart) { mapValueCopy["timesmart"] = strprintf("%u", nTimeSmart); } |