Skip to content

Commit 9ccb46f

Browse files
committed
miniscript: Ensure there is no NodeRef copy constructor or assignment operator
1 parent 6d11c9c commit 9ccb46f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/script/miniscript.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,6 +1682,10 @@ struct Node {
16821682
: Node(internal::NoDupCheck{}, ctx.MsContext(), nt, std::move(sub), val) { DuplicateKeyCheck(ctx); }
16831683
template <typename Ctx> Node(const Ctx& ctx, Fragment nt, uint32_t val = 0)
16841684
: Node(internal::NoDupCheck{}, ctx.MsContext(), nt, val) { DuplicateKeyCheck(ctx); }
1685+
1686+
// Delete copy constructor and assignment operator, use Clone() instead
1687+
Node(const Node&) = delete;
1688+
Node& operator=(const Node&) = delete;
16851689
};
16861690

16871691
namespace internal {

0 commit comments

Comments
 (0)