From c5fe5163dc31db939c44129f2ff8283b290a9330 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Mon, 16 May 2022 15:24:03 +0200 Subject: [PATCH] miniscript: nit: don't return after assert(false) --- src/script/miniscript.cpp | 2 -- 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 1aa1ddc397e..cb4d4cb783d 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> DecomposeScript(const CScript& script) diff --git a/src/script/miniscript.h b/src/script/miniscript.h index e38bb1c37d9..1fb0e17b12b 100644 --- a/src/script/miniscript.h +++ b/src/script/miniscript.h @@ -532,7 +532,6 @@ public: } } assert(false); - return {}; }; return TreeEval(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(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.