diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-12 15:02:36 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-12 15:02:36 +0000 |
commit | 5d0b75e5b6a1c70203257fecc25743e5a1e009cb (patch) | |
tree | 9014675dd7ad0285d0f7d05ddd118f557ffe6a02 /src/libstore/derivations.hh | |
parent | 13ec627e0a46d26b5de227e193a05b51af7f55e5 (diff) |
std::string_view for new derivation name parameters
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r-- | src/libstore/derivations.hh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh index 4694ec0dd..81c196ff7 100644 --- a/src/libstore/derivations.hh +++ b/src/libstore/derivations.hh @@ -26,7 +26,7 @@ struct DerivationOutputFixed struct DerivationOutput { std::variant<DerivationOutputExtensional, DerivationOutputFixed> output; - StorePath path(const Store & store, string drvName) const; + StorePath path(const Store & store, std::string_view drvName) const; }; typedef std::map<string, DerivationOutput> DerivationOutputs; @@ -45,7 +45,7 @@ struct BasicDerivation Path builder; Strings args; StringPairs env; - string name; + std::string name; BasicDerivation() { } virtual ~BasicDerivation() { }; @@ -87,7 +87,7 @@ StorePath writeDerivation(ref<Store> store, const Derivation & drv, std::string_view name, RepairFlag repair = NoRepair); /* Read a derivation from a file. */ -Derivation readDerivation(const Store & store, const Path & drvPath, string name); +Derivation readDerivation(const Store & store, const Path & drvPath, std::string_view name); // FIXME: remove bool isDerivation(const string & fileName); @@ -104,7 +104,7 @@ bool wantOutput(const string & output, const std::set<string> & wanted); struct Source; struct Sink; -Source & readDerivation(Source & in, const Store & store, BasicDerivation & drv, string name); +Source & readDerivation(Source & in, const Store & store, BasicDerivation & drv, std::string_view name); void writeDerivation(Sink & out, const Store & store, const BasicDerivation & drv); std::string hashPlaceholder(const std::string & outputName); |