mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Use -Wswitch for TxoutType where possible
This commit is contained in:
parent
fa59e0b5bd
commit
fa650ca7f1
4 changed files with 26 additions and 23 deletions
|
|
@ -106,8 +106,7 @@ static bool SignStep(const SigningProvider& provider, const BaseSignatureCreator
|
|||
std::vector<valtype> vSolutions;
|
||||
whichTypeRet = Solver(scriptPubKey, vSolutions);
|
||||
|
||||
switch (whichTypeRet)
|
||||
{
|
||||
switch (whichTypeRet) {
|
||||
case TxoutType::NONSTANDARD:
|
||||
case TxoutType::NULL_DATA:
|
||||
case TxoutType::WITNESS_UNKNOWN:
|
||||
|
|
@ -173,10 +172,8 @@ static bool SignStep(const SigningProvider& provider, const BaseSignatureCreator
|
|||
// Could not find witnessScript, add to missing
|
||||
sigdata.missing_witness_script = uint256(vSolutions[0]);
|
||||
return false;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
} // no default case, so the compiler can warn about missing cases
|
||||
assert(false);
|
||||
}
|
||||
|
||||
static CScript PushAll(const std::vector<valtype>& values)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue