aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2023-01-30 11:42:00 -0500
committerPieter Wuille <pieter@wuille.net>2023-01-30 13:13:24 -0500
commit941feb6ca28522806c4710f85ae5673abdbdb0b9 (patch)
treee77b139053104150f3731b9ccb7293b369611487
parent98db35c2f81098b179136ed6c5f2a8570b3b5900 (diff)
Avoid unclear {it = ++it;}
-rw-r--r--src/test/coins_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp
index 92bad8dd2e..312f417129 100644
--- a/src/test/coins_tests.cpp
+++ b/src/test/coins_tests.cpp
@@ -55,7 +55,7 @@ public:
bool BatchWrite(CCoinsMap& mapCoins, const uint256& hashBlock, bool erase = true) override
{
- for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end(); it = erase ? mapCoins.erase(it) : ++it) {
+ for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end(); it = erase ? mapCoins.erase(it) : std::next(it)) {
if (it->second.flags & CCoinsCacheEntry::DIRTY) {
// Same optimization used in CCoinsViewDB is to only write dirty entries.
map_[it->first] = it->second.coin;