aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r--src/libstore/store-api.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 592afebd8..4b89465e7 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -232,7 +232,7 @@ std::pair<StorePath, Hash> Store::computeStorePathForPath(std::string_view name,
.method = method,
.hash = h,
},
- {},
+ .references = {},
};
return std::make_pair(makeFixedOutputPath(name, caInfo), h);
}
@@ -442,7 +442,7 @@ ValidPathInfo Store::addToStoreSlow(std::string_view name, const Path & srcPath,
.method = method,
.hash = hash,
},
- {},
+ .references = {},
},
},
narHash,
@@ -1270,16 +1270,18 @@ std::optional<StorePathDescriptor> ValidPathInfo::fullStorePathDescriptorOpt() c
return StorePathDescriptor {
.name = std::string { path.name() },
.info = std::visit(overloaded {
- [&](const TextHash & th) {
- TextInfo info { th };
+ [&](const TextHash & th) -> ContentAddressWithReferences {
assert(!hasSelfReference);
- info.references = references;
- return ContentAddressWithReferences { info };
+ return TextInfo {
+ th,
+ .references = references,
+ };
},
- [&](const FixedOutputHash & foh) {
- FixedOutputInfo info { foh };
- info.references = static_cast<PathReferences<StorePath>>(*this);
- return ContentAddressWithReferences { info };
+ [&](const FixedOutputHash & foh) -> ContentAddressWithReferences {
+ return FixedOutputInfo {
+ foh,
+ .references = static_cast<PathReferences<StorePath>>(*this),
+ };
},
}, *ca),
};