summaryrefslogtreecommitdiff
path: root/indra/newview/llvocache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvocache.cpp')
-rwxr-xr-xindra/newview/llvocache.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 8af6d74ad7..0ff38ebdc8 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -194,6 +194,31 @@ void LLVOCacheEntry::updateEntry(U32 crc, LLDataPackerBinaryBuffer &dp)
mDP = dp;
}
+void LLVOCacheEntry::setParentID(U32 id)
+{
+ if(mParentID != id)
+ {
+ removeAllChildren();
+ mParentID = id;
+ }
+}
+
+void LLVOCacheEntry::removeAllChildren()
+{
+ if(mChildrenList.empty())
+ {
+ return;
+ }
+
+ for(vocache_entry_set_t::iterator iter = mChildrenList.begin(); iter != mChildrenList.end(); ++iter)
+ {
+ *iter->setParentID(0);
+ }
+ mChildrenList.clear();
+
+ return;
+}
+
//virtual
void LLVOCacheEntry::setOctreeEntry(LLViewerOctreeEntry* entry)
{