Skip to content

Commit

Permalink
Inline unkownHashes
Browse files Browse the repository at this point in the history
  • Loading branch information
thufschmitt committed Sep 24, 2020
1 parent 1f25494 commit 3c723d3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libstore/derivations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down Expand Up @@ -545,7 +543,7 @@ DrvHashModulo hashDerivationModulo(Store & store, const Derivation & drv, bool m
},
}, res);
if (hasUnknownHash) {
return unknownHashes;
return UnknownHashes {};
}
}

Expand Down

0 comments on commit 3c723d3

Please sign in to comment.