Skip to content

Commit fa73493

Browse files
author
MarcoFalke
committed
refactor: Use C++11 range-based for loop
1 parent fa7b164 commit fa73493

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wallet/bdb.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,8 @@ bool BerkeleyDatabase::PeriodicFlush()
623623
if (!lockDb) return false;
624624

625625
// Don't flush if any databases are in use
626-
for (auto it = env->mapFileUseCount.begin() ; it != env->mapFileUseCount.end(); it++) {
627-
if ((*it).second > 0) return false;
626+
for (const auto& use_count : env->mapFileUseCount) {
627+
if (use_count.second > 0) return false;
628628
}
629629

630630
// Don't flush if there haven't been any batch writes for this database.

0 commit comments

Comments
 (0)