mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-10 15:47:17 +02:00
refactor: Enable -Wswitch in exhaustive switch
Also, apply the comment according to the dev notes. Also, modify the dev notes to give a lambda-wrapped example. Can be reviewed via --ignore-all-space Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
This commit is contained in:
@@ -151,9 +151,8 @@ std::string GetOpName(opcodetype opcode)
|
||||
|
||||
case OP_INVALIDOPCODE : return "OP_INVALIDOPCODE";
|
||||
|
||||
default:
|
||||
return "OP_UNKNOWN";
|
||||
}
|
||||
} // no default case, so the compiler can warn about missing cases
|
||||
return "OP_UNKNOWN";
|
||||
}
|
||||
|
||||
unsigned int CScript::GetSigOpCount(bool fAccurate) const
|
||||
|
||||
@@ -121,7 +121,7 @@ std::string ScriptErrorString(const ScriptError serror)
|
||||
return "Script number overflowed or is non-minimally encoded";
|
||||
case SCRIPT_ERR_UNKNOWN_ERROR:
|
||||
case SCRIPT_ERR_ERROR_COUNT:
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
} // no default case, so the compiler can warn about missing cases
|
||||
return "unknown error";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user