summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-07-25 19:06:06 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-07-28 11:48:53 +0300
commit3b8b408b9031f295a936eb5e3342fbb7eb671c7c (patch)
treeb38f5dbdbf5ab805c56275f20adc068e3fd7c5b1 /indra/newview/llviewerinventory.cpp
parent329e71a7d94a4008c78616490c058bcce61a1332 (diff)
#3969 Make inventory creation from cache faster
Still has a lot of space for improvements, but should be 2.5 times faster
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 5f61aeaf13..6155058f14 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -761,18 +761,23 @@ void LLViewerInventoryCategory::exportLLSD(LLSD & cat_data) const
cat_data[INV_VERSION] = mVersion;
}
-bool LLViewerInventoryCategory::importLLSD(const LLSD& cat_data)
+bool LLViewerInventoryCategory::importLLSD(const std::string& label, const LLSD& value)
{
- LLInventoryCategory::importLLSD(cat_data);
- if (cat_data.has(INV_OWNER_ID))
+ if (LLInventoryCategory::importLLSD(label, value))
{
- mOwnerID = cat_data[INV_OWNER_ID].asUUID();
+ return true;
}
- if (cat_data.has(INV_VERSION))
+ else if (label == INV_OWNER_ID)
{
- setVersion(cat_data[INV_VERSION].asInteger());
+ mOwnerID = value.asUUID();
+ return true;
}
- return true;
+ else if (label == INV_VERSION)
+ {
+ setVersion(value.asInteger());
+ return true;
+ }
+ return false;
}
bool LLViewerInventoryCategory::acceptItem(LLInventoryItem* inv_item)