mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
wallet: refactor: avoid duplicate lookup on mapValue["timesmart"]
Also, use a named cast for converting the atoi64() result into an unsigned int type.
This commit is contained in:
parent
973d8ba93d
commit
98cf19ca32
1 changed files with 2 additions and 1 deletions
|
@ -217,7 +217,8 @@ public:
|
|||
|
||||
const auto it_op = mapValue.find("n");
|
||||
nOrderPos = (it_op != mapValue.end()) ? atoi64(it_op->second) : -1;
|
||||
nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(mapValue["timesmart"]) : 0;
|
||||
const auto it_ts = mapValue.find("timesmart");
|
||||
nTimeSmart = (it_ts != mapValue.end()) ? static_cast<unsigned int>(atoi64(it_ts->second)) : 0;
|
||||
|
||||
mapValue.erase("fromaccount");
|
||||
mapValue.erase("spent");
|
||||
|
|
Loading…
Add table
Reference in a new issue