diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-11 11:54:43 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-11 19:08:19 -0500 |
commit | 114a6e2b09eda7f23e7776e1cdf77715044e073e (patch) | |
tree | 34a3a255f4543925fff023160bde3789b8071e64 /src/libstore/build/derivation-goal.cc | |
parent | 8a3b1b7ced3e00d29a0274dde110801dea4a1e0e (diff) |
Make it hard to construct an empty `OutputsSpec::Names`
This should be a non-empty set, and so we don't want people doing this
by accident. We remove the zero-0 constructor with a little inheritance
trickery.
Diffstat (limited to 'src/libstore/build/derivation-goal.cc')
-rw-r--r-- | src/libstore/build/derivation-goal.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 98c1ddaae..61169635a 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -990,7 +990,7 @@ void DerivationGoal::resolvedFinished() return resolvedDrv.outputNames(); }, [&](const OutputsSpec::Names & names) { - return names; + return static_cast<std::set<std::string>>(names); }, }, wantedOutputs.raw()); @@ -1325,7 +1325,7 @@ std::pair<bool, DrvOutputs> DerivationGoal::checkPathValidity() return StringSet {}; }, [&](const OutputsSpec::Names & names) { - return names; + return static_cast<StringSet>(names); }, }, wantedOutputs.raw()); DrvOutputs validOutputs; |