summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.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/llviewerinventory.cpp
parentc1f60e7f2fe1775d8ca5f79af23579ac8a1fd851 (diff)
SH-4578 WIP - cleaner folder version accounting
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rwxr-xr-xindra/newview/llviewerinventory.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index b6a5534815..2d9fb7d773 100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -701,6 +701,19 @@ bool LLViewerInventoryCategory::fetch()
return false;
}
+S32 LLViewerInventoryCategory::getViewerDescendentCount() const
+{
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+ gInventory.getDirectDescendentsOf(getUUID(), cats, items);
+ S32 descendents_actual = 0;
+ if(cats && items)
+ {
+ descendents_actual = cats->count() + items->count();
+ }
+ return descendents_actual;
+}
+
bool LLViewerInventoryCategory::importFileLocal(LLFILE* fp)
{
// *NOTE: This buffer size is hard coded into scanf() below.