summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-05-24 15:51:33 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-05-24 15:51:33 -0400
commit34d2cd03765b6b9b582035a933f4ec11fb262ff4 (patch)
treeb269112350087c5c3fcbda0ccaf1e673006d7349 /indra/llinventory
parent6c56c77ec575141963c5de8dfa228253fe175bc3 (diff)
SH-4207 WIP - use item updates with callback when updating link descriptions. Reworked updateAppearanceFromCOF() cof-validation stages.
Diffstat (limited to 'indra/llinventory')
-rwxr-xr-xindra/llinventory/llinventory.cpp9
-rwxr-xr-xindra/llinventory/llinventory.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 641532ec29..a529aa3af3 100755
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -416,12 +416,17 @@ U32 LLInventoryItem::getCRC32() const
return crc;
}
+// static
+void LLInventoryItem::correctInventoryDescription(std::string& desc)
+{
+ LLStringUtil::replaceNonstandardASCII(desc, ' ');
+ LLStringUtil::replaceChar(desc, '|', ' ');
+}
void LLInventoryItem::setDescription(const std::string& d)
{
std::string new_desc(d);
- LLStringUtil::replaceNonstandardASCII(new_desc, ' ');
- LLStringUtil::replaceChar(new_desc, '|', ' ');
+ LLInventoryItem::correctInventoryDescription(new_desc);
if( new_desc != mDescription )
{
mDescription = new_desc;
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index 17421b3f5e..cc474f3d4c 100755
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -171,6 +171,7 @@ public:
//--------------------------------------------------------------------
public:
void setAssetUUID(const LLUUID& asset_id);
+ static void correctInventoryDescription(std::string& name);
void setDescription(const std::string& new_desc);
void setSaleInfo(const LLSaleInfo& sale_info);
void setPermissions(const LLPermissions& perm);