wallet: refactor: inline function WriteOrderPos()
Since accounts were removed in commit c9c32e6b84,
this function is only called at one place and thus can be as well inlined.
This commit is contained in:
1 parent
65ed198295
commit
973d8ba93d
1 file changed
+3
-9
@@ -19,14 +19,6 @@
|
|||||||
|
|
||||||
typedef std::map<std::string, std::string> mapValue_t;
|
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.
|
/** Legacy class used for deserializing vtxPrev for backwards compatibility.
|
||||||
* vtxPrev was removed in commit 93a18a3650292afbb441a47d1fa1b94aeb0164e3,
|
* vtxPrev was removed in commit 93a18a3650292afbb441a47d1fa1b94aeb0164e3,
|
||||||
* but old wallet.dat files may still contain vtxPrev vectors of CMerkleTxs.
|
* but old wallet.dat files may still contain vtxPrev vectors of CMerkleTxs.
|
||||||
@@ -181,7 +173,9 @@ public:
|
|||||||
mapValue_t mapValueCopy = mapValue;
|
mapValue_t mapValueCopy = mapValue;
|
||||||
|
|
||||||
mapValueCopy["fromaccount"] = "";
|
mapValueCopy["fromaccount"] = "";
|
||||||
WriteOrderPos(nOrderPos, mapValueCopy);
|
if (nOrderPos != -1) {
|
||||||
|
mapValueCopy["n"] = ToString(nOrderPos);
|
||||||
|
}
|
||||||
if (nTimeSmart) {
|
if (nTimeSmart) {
|
||||||
mapValueCopy["timesmart"] = strprintf("%u", nTimeSmart);
|
mapValueCopy["timesmart"] = strprintf("%u", nTimeSmart);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user