summaryrefslogtreecommitdiff
path: root/indra/llinventory/llinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory/llinventory.cpp')
-rw-r--r--indra/llinventory/llinventory.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index b1cfd68668..4dddd9de3e 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -333,15 +333,6 @@ void LLInventoryItem::copyItem(const LLInventoryItem* other)
mCreationDate = other->mCreationDate;
}
-// As a constructor alternative, the clone() method works like a
-// copy constructor, but gens a new UUID.
-void LLInventoryItem::cloneItem(LLPointer<LLInventoryItem>& newitem) const
-{
- newitem = new LLInventoryItem;
- newitem->copyItem(this);
- newitem->mUUID.generate();
-}
-
const LLPermissions& LLInventoryItem::getPermissions() const
{
return mPermissions;
@@ -934,6 +925,12 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
LLSD LLInventoryItem::asLLSD() const
{
LLSD sd = LLSD();
+ asLLSD(sd);
+ return sd;
+}
+
+void LLInventoryItem::asLLSD( LLSD& sd ) const
+{
sd[INV_ITEM_ID_LABEL] = mUUID;
sd[INV_PARENT_ID_LABEL] = mParentUUID;
sd[INV_PERMISSIONS_LABEL] = ll_create_sd_from_permissions(mPermissions);
@@ -965,11 +962,9 @@ LLSD LLInventoryItem::asLLSD() const
sd[INV_NAME_LABEL] = mName;
sd[INV_DESC_LABEL] = mDescription;
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
-
- return sd;
}
-bool LLInventoryItem::fromLLSD(LLSD& sd)
+bool LLInventoryItem::fromLLSD(const LLSD& sd)
{
mInventoryType = LLInventoryType::IT_NONE;
mAssetUUID.setNull();
@@ -1419,7 +1414,7 @@ void LLInventoryCategory::packMessage(LLMessageSystem* msg) const
msg->addStringFast(_PREHASH_Name, mName);
}
-bool LLInventoryCategory::fromLLSD(LLSD& sd)
+bool LLInventoryCategory::fromLLSD(const LLSD& sd)
{
std::string w;
@@ -1661,6 +1656,7 @@ LLSD ll_create_sd_from_inventory_item(LLPointer<LLInventoryItem> item)
return rv;
}
+/* deprecated, use LLInventoryItem::fromLLSD() instead
LLPointer<LLInventoryItem> ll_create_item_from_sd(const LLSD& sd_item)
{
LLPointer<LLInventoryItem> rv = new LLInventoryItem;
@@ -1690,6 +1686,7 @@ LLPointer<LLInventoryItem> ll_create_item_from_sd(const LLSD& sd_item)
rv->setCreationDate(sd_item[INV_CREATION_DATE_LABEL].asInteger());
return rv;
}
+*/
LLSD ll_create_sd_from_inventory_category(LLPointer<LLInventoryCategory> cat)
{