mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 13:47:56 +02:00
doc(miniscript): Explain why we operate on vectors
Explains the reason behind 198bbaee49 where we had earlier switched from operating on unique_ptr<Node> to plain Node.
This commit is contained in:
@@ -552,6 +552,9 @@ public:
|
||||
// Destroy the subexpressions iteratively after moving out their
|
||||
// subexpressions to avoid a stack-overflow due to recursive calls to
|
||||
// the subs' destructors.
|
||||
// We move vectors in order to only update array-pointers inside them
|
||||
// rather than moving individual Node instances which would involve
|
||||
// moving/copying each Node field.
|
||||
std::vector<std::vector<Node>> queue;
|
||||
queue.push_back(std::move(subs));
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user