aboutsummaryrefslogtreecommitdiff
path: root/src/nix/why-depends.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-16 22:20:18 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-06-16 22:20:18 +0200
commit29542865cee37ab22efe1bd142900b69f6c59f0d (patch)
tree0115a7d831276f14144aeaeae430e680e5ab0297 /src/nix/why-depends.cc
parentdf4da4f5da1e390ac1eef5bfd455a8cf85dfe52c (diff)
Remove StorePath::clone() and related functions
Diffstat (limited to 'src/nix/why-depends.cc')
-rw-r--r--src/nix/why-depends.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix/why-depends.cc b/src/nix/why-depends.cc
index a4ee2d971..167c974ee 100644
--- a/src/nix/why-depends.cc
+++ b/src/nix/why-depends.cc
@@ -106,16 +106,16 @@ struct CmdWhyDepends : SourceExprCommand
std::map<StorePath, Node> graph;
for (auto & path : closure)
- graph.emplace(path.clone(), Node { .path = path.clone(), .refs = cloneStorePathSet(store->queryPathInfo(path)->references) });
+ graph.emplace(path, Node { .path = path, .refs = store->queryPathInfo(path)->references });
// Transpose the graph.
for (auto & node : graph)
for (auto & ref : node.second.refs)
- graph.find(ref)->second.rrefs.insert(node.first.clone());
+ graph.find(ref)->second.rrefs.insert(node.first);
/* Run Dijkstra's shortest path algorithm to get the distance
of every path in the closure to 'dependency'. */
- graph.emplace(dependencyPath.clone(), Node { .path = dependencyPath.clone(), .dist = 0 });
+ graph.emplace(dependencyPath, Node { .path = dependencyPath, .dist = 0 });
std::priority_queue<Node *> queue;