Skip to content

Commit

Permalink
Use assert(false) instead of abort()
Browse files Browse the repository at this point in the history
  • Loading branch information
meditans committed Jul 28, 2020
1 parent cfe96bd commit 2980b24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libstore/derivations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ bool derivationIsCA(DerivationType dt) {
};
// Since enums can have non-variant values, but making a `default:` would
// disable exhaustiveness warnings.
abort();
assert(false);
}

bool derivationIsFixed(DerivationType dt) {
switch (dt) {
case DerivationType::Regular: return false;
case DerivationType::CAFixed: return true;
};
abort();
assert(false);
}

bool derivationIsImpure(DerivationType dt) {
switch (dt) {
case DerivationType::Regular: return false;
case DerivationType::CAFixed: return true;
};
abort();
assert(false);
}

// FIXME Put this somewhere?
Expand Down

0 comments on commit 2980b24

Please sign in to comment.