about summary refs log tree commit diff
path: root/src/libstore/pathlocks.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-04-21T11·52+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-04-21T11·52+0000
commitd5eab2fc8293e0d14c7fd297bf7512257442295b (patch)
treeaa987c9496ee667ff59eccab1681b49b363a44cd /src/libstore/pathlocks.cc
parent8f1bf28505e6ba8fae35859391cbab7264b0014a (diff)
* Use foreach in a lot of places.
Diffstat (limited to 'src/libstore/pathlocks.cc')
-rw-r--r--src/libstore/pathlocks.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc
index cad893726720..a698609d3a64 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);