aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-06-01 18:13:33 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-06-01 18:13:33 +0000
commit23960e92df736d3c87db861fcaf2dd7981cfc4ad (patch)
tree786dcc3e3149704ec16953668a96efe71ad102f5 /src
parent2d456fc35a57f3433ce228433dc8c034359cb605 (diff)
* Minor cleanup.
Diffstat (limited to 'src')
-rw-r--r--src/libstore/store.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc
index 4bf62570e..47adea14a 100644
--- a/src/libstore/store.cc
+++ b/src/libstore/store.cc
@@ -707,14 +707,12 @@ static Path _addToStore(bool fixed, bool recursive,
if (!readOnlyMode) addTempRoot(dstPath);
- if (!readOnlyMode && !isValidPath(dstPath)) {
+ if (!readOnlyMode && !isValidPath(dstPath)) {
/* The first check above is an optimisation to prevent
unnecessary lock acquisition. */
- PathSet lockPaths;
- lockPaths.insert(dstPath);
- PathLocks outputLock(lockPaths);
+ PathLocks outputLock(singleton<PathSet, Path>(dstPath));
if (!isValidPath(dstPath)) {
@@ -764,9 +762,7 @@ Path addTextToStore(const string & suffix, const string & s,
if (!readOnlyMode && !isValidPath(dstPath)) {
- PathSet lockPaths;
- lockPaths.insert(dstPath);
- PathLocks outputLock(lockPaths);
+ PathLocks outputLock(singleton<PathSet, Path>(dstPath));
if (!isValidPath(dstPath)) {