Skip to content

Commit 941feb6

Browse files
committed
Avoid unclear {it = ++it;}
1 parent 98db35c commit 941feb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/coins_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class CCoinsViewTest : public CCoinsView
5555

5656
bool BatchWrite(CCoinsMap& mapCoins, const uint256& hashBlock, bool erase = true) override
5757
{
58-
for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end(); it = erase ? mapCoins.erase(it) : ++it) {
58+
for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end(); it = erase ? mapCoins.erase(it) : std::next(it)) {
5959
if (it->second.flags & CCoinsCacheEntry::DIRTY) {
6060
// Same optimization used in CCoinsViewDB is to only write dirty entries.
6161
map_[it->first] = it->second.coin;

0 commit comments

Comments
 (0)