Skip to content

Commit 1308b83

Browse files
committed
clang-tidy: Fix performance-no-automatic-move in headers
See https://clang.llvm.org/extra/clang-tidy/checks/performance/no-automatic-move.html
1 parent 0a5dc03 commit 1308b83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/script/miniscript.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ inline NodeRef<Key> Parse(Span<const char> in, const Ctx& ctx)
13781378
assert(constructed.size() == 1);
13791379
assert(constructed[0]->ScriptSize() == script_size);
13801380
if (in.size() > 0) return {};
1381-
const NodeRef<Key> tl_node = std::move(constructed.front());
1381+
NodeRef<Key> tl_node = std::move(constructed.front());
13821382
tl_node->DuplicateKeyCheck(ctx);
13831383
return tl_node;
13841384
}
@@ -1813,7 +1813,7 @@ inline NodeRef<Key> DecodeScript(I& in, I last, const Ctx& ctx)
18131813
}
18141814
}
18151815
if (constructed.size() != 1) return {};
1816-
const NodeRef<Key> tl_node = std::move(constructed.front());
1816+
NodeRef<Key> tl_node = std::move(constructed.front());
18171817
tl_node->DuplicateKeyCheck(ctx);
18181818
// Note that due to how ComputeType works (only assign the type to the node if the
18191819
// subs' types are valid) this would fail if any node of tree is badly typed.

0 commit comments

Comments
 (0)