diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-04-21 11:52:16 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-04-21 11:52:16 +0000 |
commit | d5eab2fc8293e0d14c7fd297bf7512257442295b (patch) | |
tree | aa987c9496ee667ff59eccab1681b49b363a44cd /src/libstore/pathlocks.cc | |
parent | 8f1bf28505e6ba8fae35859391cbab7264b0014a (diff) |
* Use foreach in a lot of places.
Diffstat (limited to 'src/libstore/pathlocks.cc')
-rw-r--r-- | src/libstore/pathlocks.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc index cad893726..a698609d3 100644 --- a/src/libstore/pathlocks.cc +++ b/src/libstore/pathlocks.cc @@ -155,7 +155,7 @@ bool PathLocks::lockPaths(const PathSet & _paths, paths.sort(); /* Acquire the lock for each path. */ - for (Paths::iterator i = paths.begin(); i != paths.end(); i++) { + foreach (Paths::iterator, i, paths) { checkInterrupt(); Path path = *i; Path lockPath = path + ".lock"; @@ -219,7 +219,7 @@ PathLocks::~PathLocks() void PathLocks::unlock() { - for (list<FDPair>::iterator i = fds.begin(); i != fds.end(); i++) { + foreach (list<FDPair>::iterator, i, fds) { if (deletePaths) deleteLockFilePreClose(i->second, i->first); lockedPaths.erase(i->second); |