aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-01-17 12:56:18 +0000
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-01-18 15:47:06 +0000
commit1308b837dc3499896ca73eafa51ac69b455cef00 (patch)
treee6f6fc5957c91a378a0828e0339316cdb888270f /src/script
parent0a5dc030b92a78147787f158d6a5de234ffa8ba4 (diff)
clang-tidy: Fix `performance-no-automatic-move` in headers
See https://clang.llvm.org/extra/clang-tidy/checks/performance/no-automatic-move.html
Diffstat (limited to 'src/script')
-rw-r--r--src/script/miniscript.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/miniscript.h b/src/script/miniscript.h
index fa3b0350e9..3a3f724f03 100644
--- a/src/script/miniscript.h
+++ b/src/script/miniscript.h
@@ -1378,7 +1378,7 @@ inline NodeRef<Key> Parse(Span<const char> in, const Ctx& ctx)
assert(constructed.size() == 1);
assert(constructed[0]->ScriptSize() == script_size);
if (in.size() > 0) return {};
- const NodeRef<Key> tl_node = std::move(constructed.front());
+ NodeRef<Key> tl_node = std::move(constructed.front());
tl_node->DuplicateKeyCheck(ctx);
return tl_node;
}
@@ -1813,7 +1813,7 @@ inline NodeRef<Key> DecodeScript(I& in, I last, const Ctx& ctx)
}
}
if (constructed.size() != 1) return {};
- const NodeRef<Key> tl_node = std::move(constructed.front());
+ NodeRef<Key> tl_node = std::move(constructed.front());
tl_node->DuplicateKeyCheck(ctx);
// Note that due to how ComputeType works (only assign the type to the node if the
// subs' types are valid) this would fail if any node of tree is badly typed.