mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
refactor: Use C++11 range-based for loop
This commit is contained in:
parent
fa7b164d62
commit
fa73493930
1 changed files with 2 additions and 2 deletions
|
@ -623,8 +623,8 @@ bool BerkeleyDatabase::PeriodicFlush()
|
|||
if (!lockDb) return false;
|
||||
|
||||
// Don't flush if any databases are in use
|
||||
for (auto it = env->mapFileUseCount.begin() ; it != env->mapFileUseCount.end(); it++) {
|
||||
if ((*it).second > 0) return false;
|
||||
for (const auto& use_count : env->mapFileUseCount) {
|
||||
if (use_count.second > 0) return false;
|
||||
}
|
||||
|
||||
// Don't flush if there haven't been any batch writes for this database.
|
||||
|
|
Loading…
Add table
Reference in a new issue