diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-10-21 13:57:24 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-10-21 13:51:21 +0200 |
commit | fa650ca7f19307a9237e64ac311488c8947fc12a (patch) | |
tree | aa7bfa72129b010a07b2d4e537dee944818391ee /src/script/sign.cpp | |
parent | fa59e0b5bd2aed8380cc9b9e52791f662aecd6a6 (diff) |
Use -Wswitch for TxoutType where possible
Diffstat (limited to 'src/script/sign.cpp')
-rw-r--r-- | src/script/sign.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 0e6864d547..be3a151206 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -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) |