summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llconversationmodel.cpp')
-rw-r--r--indra/newview/llconversationmodel.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index f152e36cf5..44d4c863c7 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -357,22 +357,20 @@ void LLConversationItemSession::clearParticipants()
void LLConversationItemSession::clearAndDeparentModels()
{
- std::for_each(mChildren.begin(), mChildren.end(),
- [](LLFolderViewModelItem* c)
+ for (LLFolderViewModelItem* child : mChildren)
+ {
+ if (child->getNumRefs() == 0)
+ {
+ // LLConversationItemParticipant can be created but not assigned to any view,
+ // it was waiting for an "add_participant" event to be processed
+ delete child;
+ }
+ else
{
- if (c->getNumRefs() == 0)
- {
- // LLConversationItemParticipant can be created but not assigned to any view,
- // it was waiting for an "add_participant" event to be processed
- delete c;
- }
- else
- {
- // Model is still assigned to some view/widget
- c->setParent(NULL);
- }
+ // Model is still assigned to some view/widget
+ child->setParent(NULL);
}
- );
+ }
mChildren.clear();
}