summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-11-18 13:19:43 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-11-18 13:19:43 -0500
commit8179175e6e6078fab9dc16cf02b5ee744955cd7d (patch)
treea147f869d346e6728c34ad0bfe6e7c6f56213580 /indra/newview/llinventorymodel.cpp
parentc1f60e7f2fe1775d8ca5f79af23579ac8a1fd851 (diff)
SH-4578 WIP - cleaner folder version accounting
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rwxr-xr-xindra/newview/llinventorymodel.cpp30
1 files changed, 3 insertions, 27 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 3dbc1ae288..52b6e4bf3b 100755
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -105,17 +105,7 @@ bool LLCanCache::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
if(c->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN)
{
S32 descendents_server = c->getDescendentCount();
- LLInventoryModel::cat_array_t* cats;
- LLInventoryModel::item_array_t* items;
- mModel->getDirectDescendentsOf(
- c->getUUID(),
- cats,
- items);
- S32 descendents_actual = 0;
- if(cats && items)
- {
- descendents_actual = cats->count() + items->count();
- }
+ S32 descendents_actual = c->getViewerDescendentCount();
if(descendents_server == descendents_actual)
{
mCachedCatIDs.insert(c->getUUID());
@@ -1717,14 +1707,7 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const
if(version != LLViewerInventoryCategory::VERSION_UNKNOWN)
{
S32 descendents_server = cat->getDescendentCount();
- LLInventoryModel::cat_array_t* cats;
- LLInventoryModel::item_array_t* items;
- getDirectDescendentsOf(update.mCategoryID, cats, items);
- S32 descendents_actual = 0;
- if(cats && items)
- {
- descendents_actual = cats->count() + items->count();
- }
+ S32 descendents_actual = cat->getViewerDescendentCount();
if(descendents_server == descendents_actual)
{
descendents_actual += update.mDescendentDelta;
@@ -1821,14 +1804,7 @@ bool LLInventoryModel::isCategoryComplete(const LLUUID& cat_id) const
if(cat && (cat->getVersion()!=LLViewerInventoryCategory::VERSION_UNKNOWN))
{
S32 descendents_server = cat->getDescendentCount();
- LLInventoryModel::cat_array_t* cats;
- LLInventoryModel::item_array_t* items;
- getDirectDescendentsOf(cat_id, cats, items);
- S32 descendents_actual = 0;
- if(cats && items)
- {
- descendents_actual = cats->count() + items->count();
- }
+ S32 descendents_actual = cat->getViewerDescendentCount();
if(descendents_server == descendents_actual)
{
return true;