diff options
Diffstat (limited to 'src/libstore/optimise-store.cc')
-rw-r--r-- | src/libstore/optimise-store.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc index 55c252b9b2e3..6f66961792fb 100644 --- a/src/libstore/optimise-store.cc +++ b/src/libstore/optimise-store.cc @@ -99,8 +99,8 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa if (S_ISDIR(st.st_mode)) { Strings names = readDirectoryIgnoringInodes(path, inodeHash); - foreach (Strings::iterator, i, names) - optimisePath_(stats, path + "/" + *i, inodeHash); + for (auto & i : names) + optimisePath_(stats, path + "/" + i, inodeHash); return; } @@ -218,11 +218,11 @@ void LocalStore::optimiseStore(OptimiseStats & stats) PathSet paths = queryAllValidPaths(); InodeHash inodeHash = loadInodeHash(); - foreach (PathSet::iterator, i, paths) { - addTempRoot(*i); - if (!isValidPath(*i)) continue; /* path was GC'ed, probably */ - startNest(nest, lvlChatty, format("hashing files in ‘%1%’") % *i); - optimisePath_(stats, *i, inodeHash); + for (auto & i : paths) { + addTempRoot(i); + if (!isValidPath(i)) continue; /* path was GC'ed, probably */ + startNest(nest, lvlChatty, format("hashing files in ‘%1%’") % i); + optimisePath_(stats, i, inodeHash); } } |