diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-03-04T15·49+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-03-04T15·49+0100 |
commit | 42bc395b63260e13f42e4bf348823799e78e445f (patch) | |
tree | 282cad864de6752d4ef4a02d8c6dc92cfece223f /src/libstore/build.cc | |
parent | ce113c32d27a24552a6420ea0c082c6886708759 (diff) |
Eliminate some large string copying
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 7d124f6f0ee0..ed4e0f659da3 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; |