Skip to content

Commit

Permalink
clang-tidy: Fix performance-no-automatic-move in headers
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Jan 18, 2023
1 parent 0a5dc03 commit 1308b83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/script/miniscript.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 1308b83

Please sign in to comment.