Avoid the use of P0083R3 std::set::merge
This commit is contained in:
1 parent
3e306ee1d5
commit
6cf4ea7187
1 file changed
+7
-1
@@ -407,7 +407,13 @@ void TaprootSpendData::Merge(TaprootSpendData other)
|
|||||||
merkle_root = other.merkle_root;
|
merkle_root = other.merkle_root;
|
||||||
}
|
}
|
||||||
for (auto& [key, control_blocks] : other.scripts) {
|
for (auto& [key, control_blocks] : other.scripts) {
|
||||||
scripts[key].merge(std::move(control_blocks));
|
// Once P0083R3 is supported by all our targeted platforms,
|
||||||
|
// this loop body can be replaced with:
|
||||||
|
// scripts[key].merge(std::move(control_blocks));
|
||||||
|
auto& target = scripts[key];
|
||||||
|
for (auto& control_block: control_blocks) {
|
||||||
|
target.insert(std::move(control_block));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user