mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 04:52:36 +02: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
@ -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…
Reference in New Issue
Block a user