summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Beauchamp <sldev@free.fr>2023-02-07 22:18:44 +0100
committerHenri Beauchamp <sldev@free.fr>2023-02-07 22:18:44 +0100
commitc3ab9487245ac77016f3b651e2db47d239941659 (patch)
tree9cb9f0798dcd8e0a8428f965ac9ee845c14dec17
parentbf7faa3267e549b01131c6746202a5b6cda8e68a (diff)
Added a digest_t typedef to clarify the usage of the digest LLUUID
As suggested in comments for previous commit.
-rw-r--r--indra/newview/llinventorymodel.cpp2
-rw-r--r--indra/newview/llinventorymodel.h3
-rw-r--r--indra/newview/llinventoryobserver.cpp6
-rw-r--r--indra/newview/llinventoryobserver.h5
4 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index b41ad51fa4..e56a0ba414 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -452,7 +452,7 @@ void LLInventoryModel::getDirectDescendentsOf(const LLUUID& cat_id,
items = get_ptr_in_map(mParentChildItemTree, cat_id);
}
-LLUUID LLInventoryModel::hashDirectDescendentNames(const LLUUID& cat_id) const
+LLInventoryModel::digest_t LLInventoryModel::hashDirectDescendentNames(const LLUUID& cat_id) const
{
LLInventoryModel::cat_array_t* cat_array;
LLInventoryModel::item_array_t* item_array;
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index ac10488d14..ef4a7d984d 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -256,8 +256,9 @@ public:
cat_array_t*& categories,
item_array_t*& items) const;
+ typedef LLUUID digest_t; // To clarify the actual usage of this "UUID"
// Compute a hash of direct descendant names (for detecting child name changes)
- LLUUID hashDirectDescendentNames(const LLUUID& cat_id) const;
+ digest_t hashDirectDescendentNames(const LLUUID& cat_id) const;
// Starting with the object specified, add its descendants to the
// array provided, but do not add the inventory object specified
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 2b252e369d..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))
{
- LLUUID 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)
{
- LLUUID 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
@@ -730,7 +730,7 @@ LLInventoryCategoriesObserver::LLCategoryData::LLCategoryData(
}
LLInventoryCategoriesObserver::LLCategoryData::LLCategoryData(
- const LLUUID& cat_id, callback_t cb, S32 version, S32 num_descendents, const LLUUID& name_hash)
+ const LLUUID& cat_id, callback_t cb, S32 version, S32 num_descendents, const digest_t& name_hash)
: mCatID(cat_id)
, mCallback(cb)
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index ec42e0449b..4af8102055 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -270,14 +270,15 @@ public:
void removeCategory(const LLUUID& cat_id);
protected:
+ typedef LLUUID digest_t; // To clarify the actual usage of this "UUID"
struct LLCategoryData
{
LLCategoryData(const LLUUID& cat_id, callback_t cb, S32 version, S32 num_descendents);
- LLCategoryData(const LLUUID& cat_id, callback_t cb, S32 version, S32 num_descendents, const LLUUID& name_hash);
+ LLCategoryData(const LLUUID& cat_id, callback_t cb, S32 version, S32 num_descendents, const digest_t& name_hash);
callback_t mCallback;
S32 mVersion;
S32 mDescendentsCount;
- LLUUID mItemNameHash;
+ digest_t mItemNameHash;
bool mIsNameHashInitialized;
LLUUID mCatID;
};