mirror of
https://github.com/NixOS/nix.git
synced 2025-11-17 07:52:43 +01:00
Remove some designated initializers
With the switch to C++20, the rules became more strict, and we can no longer initialize base classes. Make them comments instead. (BTW https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2287r1.html this offers some new syntax for this use-case. Hopefully this will be adopted and we can eventually use it.)
This commit is contained in:
parent
59d3175649
commit
ee9eb83a84
16 changed files with 21 additions and 21 deletions
|
|
@ -313,7 +313,7 @@ StorePath BinaryCacheStore::addToStoreFromDump(Source & dump, std::string_view n
|
|||
.method = method,
|
||||
.hash = nar.first,
|
||||
},
|
||||
.references = {
|
||||
/* .references = */ {
|
||||
.others = references,
|
||||
.self = false,
|
||||
},
|
||||
|
|
@ -431,7 +431,7 @@ StorePath BinaryCacheStore::addToStore(
|
|||
.method = method,
|
||||
.hash = h,
|
||||
},
|
||||
.references = {
|
||||
/* .references = */ {
|
||||
.others = references,
|
||||
.self = false,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2498,7 +2498,7 @@ DrvOutputs LocalDerivationGoal::registerOutputs()
|
|||
.method = outputHash.method,
|
||||
.hash = got,
|
||||
},
|
||||
.references = rewriteRefs(),
|
||||
/* .references = */ rewriteRefs(),
|
||||
},
|
||||
Hash::dummy,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -167,13 +167,13 @@ ContentAddressWithReferences caWithoutRefs(const ContentAddress & ca) {
|
|||
[&](const TextHash & h) -> ContentAddressWithReferences {
|
||||
return TextInfo {
|
||||
h,
|
||||
.references = {},
|
||||
/* .references = */ {},
|
||||
};
|
||||
},
|
||||
[&](const FixedOutputHash & h) -> ContentAddressWithReferences {
|
||||
return FixedOutputInfo {
|
||||
h,
|
||||
.references = {},
|
||||
/* .references = */ {},
|
||||
};
|
||||
},
|
||||
}, ca);
|
||||
|
|
|
|||
|
|
@ -1419,7 +1419,7 @@ StorePath LocalStore::addToStoreFromDump(Source & source0, std::string_view name
|
|||
.method = method,
|
||||
.hash = hash,
|
||||
},
|
||||
.references = {
|
||||
/* .references = */ {
|
||||
.others = references,
|
||||
.self = false,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ std::map<StorePath, StorePath> makeContentAddressed(
|
|||
.method = FileIngestionMethod::Recursive,
|
||||
.hash = narModuloHash,
|
||||
},
|
||||
.references = std::move(refs),
|
||||
/* .references = */ std::move(refs),
|
||||
},
|
||||
Hash::dummy,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ std::optional<ContentAddressWithReferences> ValidPathInfo::contentAddressWithRef
|
|||
assert(references.count(path) == 0);
|
||||
return TextInfo {
|
||||
th,
|
||||
.references = references,
|
||||
/* .references = */ references,
|
||||
};
|
||||
},
|
||||
[&](const FixedOutputHash & foh) -> ContentAddressWithReferences {
|
||||
|
|
@ -43,7 +43,7 @@ std::optional<ContentAddressWithReferences> ValidPathInfo::contentAddressWithRef
|
|||
}
|
||||
return FixedOutputInfo {
|
||||
foh,
|
||||
.references = {
|
||||
/* .references = */ {
|
||||
.others = std::move(refs),
|
||||
.self = hasSelfReference,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ std::pair<StorePath, Hash> Store::computeStorePathForPath(std::string_view name,
|
|||
.method = method,
|
||||
.hash = h,
|
||||
},
|
||||
.references = {},
|
||||
/* .references = */ {},
|
||||
};
|
||||
return std::make_pair(makeFixedOutputPath(name, caInfo), h);
|
||||
}
|
||||
|
|
@ -443,7 +443,7 @@ ValidPathInfo Store::addToStoreSlow(std::string_view name, const Path & srcPath,
|
|||
.method = method,
|
||||
.hash = hash,
|
||||
},
|
||||
.references = {},
|
||||
/* .references = */ {},
|
||||
},
|
||||
narHash,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue