diff options
author | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-02-07 23:52:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 23:52:34 +0200 |
commit | 7496e746af2fae3d817e1c665923a0996b5673e3 (patch) | |
tree | ef79b4b5d1fb51e8dbe413f310da0dd4da299622 /indra/newview/llinventoryobserver.cpp | |
parent | 1eb2b23f4b254052924b198d446c052df9ca3124 (diff) | |
parent | c3ab9487245ac77016f3b651e2db47d239941659 (diff) |
SL-19159 pull request #71 from sldevel/invcat-fast-hash
Faster and simpler inventory category hashing.
Diffstat (limited to 'indra/newview/llinventoryobserver.cpp')
-rw-r--r-- | indra/newview/llinventoryobserver.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 26d7a7a28a..db0751cb89 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -640,7 +640,7 @@ void LLInventoryCategoriesObserver::changed(U32 mask) // computed, or (b) a name has changed. if (!cat_data.mIsNameHashInitialized || (mask & LLInventoryObserver::LABEL)) { - LLMD5 item_name_hash = gInventory.hashDirectDescendentNames(cat_id); + digest_t item_name_hash = gInventory.hashDirectDescendentNames(cat_id); if (cat_data.mItemNameHash != item_name_hash) { cat_data.mIsNameHashInitialized = true; @@ -701,7 +701,7 @@ bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t { if(init_name_hash) { - LLMD5 item_name_hash = gInventory.hashDirectDescendentNames(cat_id); + digest_t item_name_hash = gInventory.hashDirectDescendentNames(cat_id); mCategoryMap.insert(category_map_value_t(cat_id,LLCategoryData(cat_id, cb, version, current_num_known_descendents,item_name_hash))); } else @@ -727,11 +727,10 @@ LLInventoryCategoriesObserver::LLCategoryData::LLCategoryData( , mDescendentsCount(num_descendents) , mIsNameHashInitialized(false) { - mItemNameHash.finalize(); } LLInventoryCategoriesObserver::LLCategoryData::LLCategoryData( - const LLUUID& cat_id, callback_t cb, S32 version, S32 num_descendents, LLMD5 name_hash) + const LLUUID& cat_id, callback_t cb, S32 version, S32 num_descendents, const digest_t& name_hash) : mCatID(cat_id) , mCallback(cb) |