diff options
author | Antoine Poinsot <darosior@protonmail.com> | 2022-05-16 15:24:03 +0200 |
---|---|---|
committer | Antoine Poinsot <darosior@protonmail.com> | 2022-05-30 15:16:45 +0200 |
commit | c5fe5163dc31db939c44129f2ff8283b290a9330 (patch) | |
tree | 8f5009482c4b86d2bd46657e75fdc293baa671a3 /src | |
parent | 7bbaca9d8d355a17348a8d01e3e2521c5de466b0 (diff) | |
download | bitcoin-c5fe5163dc31db939c44129f2ff8283b290a9330.tar.xz |
miniscript: nit: don't return after assert(false)
Diffstat (limited to 'src')
-rw-r--r-- | src/script/miniscript.cpp | 2 | ||||
-rw-r--r-- | src/script/miniscript.h | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/script/miniscript.cpp b/src/script/miniscript.cpp index 1aa1ddc397..cb4d4cb783 100644 --- a/src/script/miniscript.cpp +++ b/src/script/miniscript.cpp @@ -245,7 +245,6 @@ Type ComputeType(Fragment fragment, Type x, Type y, Type z, const std::vector<Ty } } assert(false); - return ""_mst; } size_t ComputeScriptLen(Fragment fragment, Type sub0typ, size_t subsize, uint32_t k, size_t n_subs, size_t n_keys) { @@ -278,7 +277,6 @@ size_t ComputeScriptLen(Fragment fragment, Type sub0typ, size_t subsize, uint32_ case Fragment::THRESH: return subsize + n_subs + BuildScript(k).size(); } assert(false); - return 0; } std::optional<std::vector<Opcode>> DecomposeScript(const CScript& script) diff --git a/src/script/miniscript.h b/src/script/miniscript.h index e38bb1c37d..1fb0e17b12 100644 --- a/src/script/miniscript.h +++ b/src/script/miniscript.h @@ -532,7 +532,6 @@ public: } } assert(false); - return {}; }; return TreeEval<CScript>(false, downfn, upfn); } @@ -632,9 +631,9 @@ public: } return std::move(str) + ")"; } - default: assert(false); + default: break; } - return ""; // Should never be reached. + assert(false); }; return TreeEvalMaybe<std::string>(false, downfn, upfn); @@ -711,7 +710,6 @@ public: } } assert(false); - return {0, {}, {}}; } internal::StackSize CalcStackSize() const { @@ -762,7 +760,6 @@ public: } } assert(false); - return {{}, {}}; } /** Check whether any key is repeated. |