diff options
author | regnat <rg@regnat.ovh> | 2020-09-24 10:11:58 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2020-10-27 07:29:25 +0100 |
commit | bc081bcd816542d66f1578788b93df4d7e07b135 (patch) | |
tree | 26dd4e45fa174a64b13c1cc1879d50734f3d8a64 /src/libstore/derivations.cc | |
parent | c092fa4702215fdb61611c5dd28194401d056170 (diff) |
Inline `unkownHashes`
See https://github.com/NixOS/nix/pull/4056#discussion_r493661632
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r-- | src/libstore/derivations.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index 3b3a25391..517ecfaa2 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -475,8 +475,6 @@ static const DrvHashModulo & pathDerivationModulo(Store & store, const StorePath return h->second; } -UnknownHashes unknownHashes; - /* See the header for interface details. These are the implementation details. For fixed-output derivations, each hash in the map is not the @@ -499,7 +497,7 @@ DrvHashModulo hashDerivationModulo(Store & store, const Derivation & drv, bool m /* Return a fixed hash for fixed-output derivations. */ switch (drv.type()) { case DerivationType::CAFloating: - return unknownHashes; + return UnknownHashes {}; case DerivationType::CAFixed: { std::map<std::string, Hash> outputHashes; for (const auto & i : drv.outputs) { @@ -545,7 +543,7 @@ DrvHashModulo hashDerivationModulo(Store & store, const Derivation & drv, bool m }, }, res); if (hasUnknownHash) { - return unknownHashes; + return UnknownHashes {}; } } |