From abea26a9683d58e0bee43d9ededeb710f3617603 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 12 Jul 2020 01:57:06 +0000 Subject: [PATCH] BasicDerivation::findOutput cannot return reference anymore --- src/libstore/derivations.cc | 2 +- src/libstore/derivations.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index 86f55342d..bde147502 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -24,7 +24,7 @@ StorePath DerivationOutput::path(const Store & store, string drvName) const }, output); } -const StorePath & BasicDerivation::findOutput(const Store & store, const string & id) const +const StorePath BasicDerivation::findOutput(const Store & store, const string & id) const { auto i = outputs.find(id); if (i == outputs.end()) diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh index 2515188ec..4694ec0dd 100644 --- a/src/libstore/derivations.hh +++ b/src/libstore/derivations.hh @@ -52,7 +52,7 @@ struct BasicDerivation /* Return the path corresponding to the output identifier `id' in the given derivation. */ - const StorePath & findOutput(const Store & store, const std::string & id) const; + const StorePath findOutput(const Store & store, const std::string & id) const; bool isBuiltin() const;