mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 22:46:16 +02:00
Optimize ValidPathInfo
construction a bit better
This commit is contained in:
parent
6a168254ce
commit
9cfa78e58a
1 changed files with 6 additions and 6 deletions
|
@ -1340,13 +1340,13 @@ ValidPathInfo::ValidPathInfo(
|
||||||
, narHash(narHash)
|
, narHash(narHash)
|
||||||
{
|
{
|
||||||
std::visit(overloaded {
|
std::visit(overloaded {
|
||||||
[this](const TextInfo & ti) {
|
[this](TextInfo && ti) {
|
||||||
this->references = ti.references;
|
this->references = std::move(ti.references);
|
||||||
this->ca = TextHash { std::move(ti) };
|
this->ca = std::move((TextHash &&) ti);
|
||||||
},
|
},
|
||||||
[this](const FixedOutputInfo & foi) {
|
[this](FixedOutputInfo && foi) {
|
||||||
*(static_cast<PathReferences<StorePath> *>(this)) = foi.references;
|
*(static_cast<PathReferences<StorePath> *>(this)) = std::move(foi.references);
|
||||||
this->ca = FixedOutputHash { (FixedOutputHash) std::move(foi) };
|
this->ca = std::move((FixedOutputHash &&) foi);
|
||||||
},
|
},
|
||||||
}, std::move(info.info));
|
}, std::move(info.info));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue