diff options
Diffstat (limited to 'src/libstore/optimise-store.cc')
-rw-r--r-- | src/libstore/optimise-store.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc index 590e1f2e19f8..2246fa8269a6 100644 --- a/src/libstore/optimise-store.cc +++ b/src/libstore/optimise-store.cc @@ -131,7 +131,7 @@ static void hashAndLink(bool dryRun, HashToPath & hashToPath, if (S_ISDIR(st.st_mode)) { Strings names = readDirectory(path); - for (Strings::iterator i = names.begin(); i != names.end(); ++i) + foreach (Strings::iterator, i, names) hashAndLink(dryRun, hashToPath, stats, path + "/" + *i); } } @@ -143,7 +143,7 @@ void LocalStore::optimiseStore(bool dryRun, OptimiseStats & stats) PathSet paths = queryValidPaths(); - for (PathSet::iterator i = paths.begin(); i != paths.end(); ++i) { + 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); |