diff options
author | Andrew Meadows <andrew@lindenlab.com> | 2009-04-01 17:11:37 +0000 |
---|---|---|
committer | Andrew Meadows <andrew@lindenlab.com> | 2009-04-01 17:11:37 +0000 |
commit | 3d4e04b5569952629f68c52c9309b5364e16136c (patch) | |
tree | 16bf58109074959695886f7125170c37b095cd90 /indra/llinventory/llinventory.cpp | |
parent | a8525c90b9ab0544583585cf887388b64ee1323f (diff) |
QAR-1284 ip-takedown tools simulator work is ready for merge
svn merge -r115879:116020 svn+ssh://svn.lindenlab.com/svn/linden/branches/dmcat/dmcat-5
no conflicts
Diffstat (limited to 'indra/llinventory/llinventory.cpp')
-rw-r--r-- | indra/llinventory/llinventory.cpp | 23 |
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) { |