refactor: Use C++11 range-based for loop

pull/764/head
MarcoFalke 4 years ago
parent fa7b164d62
commit fa73493930
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

@ -623,8 +623,8 @@ bool BerkeleyDatabase::PeriodicFlush()
if (!lockDb) return false; if (!lockDb) return false;
// Don't flush if any databases are in use // Don't flush if any databases are in use
for (auto it = env->mapFileUseCount.begin() ; it != env->mapFileUseCount.end(); it++) { for (const auto& use_count : env->mapFileUseCount) {
if ((*it).second > 0) return false; if (use_count.second > 0) return false;
} }
// Don't flush if there haven't been any batch writes for this database. // Don't flush if there haven't been any batch writes for this database.

Loading…
Cancel
Save