summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-07-21 14:14:42 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-07-21 14:14:42 +0300
commit4a999fe04414f5489c555dbd609e7bae1c2667d6 (patch)
treec93505b07bbd7ca68ed7239655c42e7316b17ecd /indra/newview/llinventorymodel.cpp
parent52abfbbc4a3fbf55379fab861a1312eb5cecbc4d (diff)
parent842e5111ae2d0a83755ff902afa43dc84e45662b (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 13e5cb516e..5a952bb6a8 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -294,6 +294,30 @@ void LLInventoryModel::getDirectDescendentsOf(const LLUUID& cat_id,
items = get_ptr_in_map(mParentChildItemTree, cat_id);
}
+LLMD5 LLInventoryModel::hashDirectDescendentNames(const LLUUID& cat_id) const
+{
+ LLInventoryModel::cat_array_t* cat_array;
+ LLInventoryModel::item_array_t* item_array;
+ getDirectDescendentsOf(cat_id,cat_array,item_array);
+ LLMD5 item_name_hash;
+ if (!item_array)
+ {
+ item_name_hash.finalize();
+ return item_name_hash;
+ }
+ for (LLInventoryModel::item_array_t::const_iterator iter = item_array->begin();
+ iter != item_array->end();
+ iter++)
+ {
+ const LLViewerInventoryItem *item = (*iter);
+ if (!item)
+ continue;
+ item_name_hash.update(item->getName());
+ }
+ item_name_hash.finalize();
+ return item_name_hash;
+}
+
// SJB: Added version to lock the arrays to catch potential logic bugs
void LLInventoryModel::lockDirectDescendentArrays(const LLUUID& cat_id,
cat_array_t*& categories,