aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-04 16:49:56 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-04 16:49:56 +0100
commit42bc395b63260e13f42e4bf348823799e78e445f (patch)
tree282cad864de6752d4ef4a02d8c6dc92cfece223f /src/libstore/build.cc
parentce113c32d27a24552a6420ea0c082c6886708759 (diff)
Eliminate some large string copying
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 7d124f6f0..ed4e0f659 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2009,7 +2009,7 @@ void DerivationGoal::startBuilder()
throw SysError(format("linking ‘%1%’ to ‘%2%’") % p % i);
StringSink sink;
dumpPath(i, sink);
- StringSource source(sink.s);
+ StringSource source(*sink.s);
restorePath(p, source);
}
}
@@ -2666,8 +2666,8 @@ void DerivationGoal::registerOutputs()
StringSink sink;
dumpPath(actualPath, sink);
deletePath(actualPath);
- sink.s = rewriteHashes(sink.s, rewritesFromTmp);
- StringSource source(sink.s);
+ sink.s = make_ref<std::string>(rewriteHashes(*sink.s, rewritesFromTmp));
+ StringSource source(*sink.s);
restorePath(actualPath, source);
rewritten = true;