Skip to content

Commit

Permalink
Make iteration type explicit, this is very important here.
Browse files Browse the repository at this point in the history
Summary: We need to be very careful in this part of the code as to where things are copied, or dereferenced.

Test Plan:
  ninja check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D11439
  • Loading branch information
deadalnix committed May 10, 2022
1 parent bea681f commit 8265445
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/radix.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ template <typename T> struct RadixTree {
void forEachLeaf(RadixElement e, Callable &&func) const {
if (e.isNode()) {
e.getNode()->forEachChild(
[&](auto pElement) { forEachLeaf(pElement->load(), func); });
[&](const std::atomic<RadixElement> *pElement) {
forEachLeaf(pElement->load(), func);
});
return;
}

Expand Down

0 comments on commit 8265445

Please sign in to comment.