From 87c91cc283340c6b7fce90ac9f80826ba641a36f Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Mon, 8 Dec 2008 01:29:12 -0600 Subject: Added LLInventoryItem::recalcNInventoryType(). --- ChangeLog.txt | 6 ++++++ linden/indra/llinventory/llinventory.cpp | 6 ++++++ linden/indra/llinventory/llinventory.h | 3 +++ 3 files changed, 15 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 0036b77..6fd9698 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,12 @@ 2008-12-08 Jacek Antonelli * linden/indra/llinventory/llinventory.cpp: + Added LLInventoryItem::recalcNInventoryType(). + * linden/indra/llinventory/llinventory.h: + Ditto. + + + * linden/indra/llinventory/llinventory.cpp: Added calc_ntype() function. * linden/indra/llinventory/llinventory.h: Ditto. diff --git a/linden/indra/llinventory/llinventory.cpp b/linden/indra/llinventory/llinventory.cpp index 38cb37d..8d8008e 100644 --- a/linden/indra/llinventory/llinventory.cpp +++ b/linden/indra/llinventory/llinventory.cpp @@ -509,6 +509,12 @@ U32 LLInventoryItem::getCRC32() const } +void LLInventoryItem::recalcNInventoryType() +{ + setNInventoryType( calc_ntype(mInventoryType, mType, mFlags) ); +} + + void LLInventoryItem::setDescription(const std::string& d) { std::string new_desc(d); diff --git a/linden/indra/llinventory/llinventory.h b/linden/indra/llinventory/llinventory.h index 247e646..34d9445 100644 --- a/linden/indra/llinventory/llinventory.h +++ b/linden/indra/llinventory/llinventory.h @@ -285,6 +285,9 @@ public: LLSD asLLSD() const; bool fromLLSD(LLSD& sd); +private: + void recalcNInventoryType(); + }; BOOL item_dictionary_sort(LLInventoryItem* a,LLInventoryItem* b); -- cgit v1.1