aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/realisation.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-08-25 09:53:12 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-08-25 09:55:07 -0400
commit2f5d3da8062ae58242a8de2bad470a66478edea4 (patch)
tree7d411b5cd956ed8fa819c657982cd5da1de2215f /src/libstore/realisation.hh
parent0a6ac133cfd1c86b8f6062b8b12e5aac8e18df3c (diff)
Introduce `OutputName` and `OutputNameView` type aliases
Hopefully they make the code easier to understand!
Diffstat (limited to 'src/libstore/realisation.hh')
-rw-r--r--src/libstore/realisation.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/realisation.hh b/src/libstore/realisation.hh
index 0548b30c1..559483ce3 100644
--- a/src/libstore/realisation.hh
+++ b/src/libstore/realisation.hh
@@ -34,7 +34,7 @@ struct DrvOutput {
/**
* The name of the output.
*/
- std::string outputName;
+ OutputName outputName;
std::string to_string() const;
@@ -84,7 +84,7 @@ struct Realisation {
* Since these are the outputs of a single derivation, we know the
* output names are unique so we can use them as the map key.
*/
-typedef std::map<std::string, Realisation> SingleDrvOutputs;
+typedef std::map<OutputName, Realisation> SingleDrvOutputs;
/**
* Collection type for multiple derivations' outputs' `Realisation`s.
@@ -146,7 +146,7 @@ public:
MissingRealisation(DrvOutput & outputId)
: MissingRealisation(outputId.outputName, outputId.strHash())
{}
- MissingRealisation(std::string_view drv, std::string outputName)
+ MissingRealisation(std::string_view drv, OutputName outputName)
: Error( "cannot operate on output '%s' of the "
"unbuilt derivation '%s'",
outputName,