Skip to content

Commit 93b5962

Browse files
authored
Merge pull request #212 from TheCoconutChef/revert-to-index-based-notify-loop
revert to index based notify loop
2 parents 3f68361 + c54da43 commit 93b5962

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lager/detail/nodes.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,9 @@ class reader_node : public observable_reader_node<T>
235235
bool garbage = false;
236236

237237
this->observers()(last_);
238-
for (auto& wchild : this->children()) {
239-
if (auto child = wchild.lock()) {
238+
const auto& children = this->children();
239+
for (size_t i = 0, size = children.size(); i < size; ++i) {
240+
if (auto child = children[i].lock()) {
240241
child->notify();
241242
} else {
242243
garbage = true;

0 commit comments

Comments
 (0)