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.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 3defad8f3b..f126accfb8 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -1017,10 +1017,9 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
if (i->first == INV_THUMBNAIL_LABEL)
{
const LLSD &thumbnail_map = i->second;
- const std::string w = INV_ASSET_ID_LABEL;
- if (thumbnail_map.has(w))
+ if (thumbnail_map.has(INV_ASSET_ID_LABEL))
{
- mThumbnailUUID = thumbnail_map[w];
+ mThumbnailUUID = thumbnail_map[INV_ASSET_ID_LABEL];
}
/* Example:
<key> asset_id </key>
@@ -1033,7 +1032,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
<integer> 1 </key>
*/
continue;
- }
+ }
if (i->first == INV_THUMBNAIL_ID_LABEL)
{
@@ -1044,10 +1043,9 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
if (i->first == INV_FAVORITE_LABEL)
{
const LLSD& favorite_map = i->second;
- const std::string w = INV_TOGGLED_LABEL;
- if (favorite_map.has(w))
+ if (favorite_map.has(INV_TOGGLED_LABEL))
{
- mFavorite = favorite_map[w].asBoolean();
+ mFavorite = favorite_map[INV_TOGGLED_LABEL].asBoolean();
}
continue;
}
@@ -1111,7 +1109,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
LLSD const &label = i->second;
if (label.isString())
{
- mType = LLAssetType::lookup(label.asString().c_str());
+ mType = LLAssetType::lookup(label.asStringRef().c_str());
}
else if (label.isInteger())
{
@@ -1126,7 +1124,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
LLSD const &label = i->second;
if (label.isString())
{
- mInventoryType = LLInventoryType::lookup(label.asString().c_str());
+ mInventoryType = LLInventoryType::lookup(label.asStringRef().c_str());
}
else if (label.isInteger())
{
@@ -1290,7 +1288,7 @@ void LLInventoryCategory::packMessage(LLMessageSystem* msg) const
bool LLInventoryCategory::fromLLSD(const LLSD& sd)
{
- std::string w;
+ std::string_view w;
w = INV_FOLDER_ID_LABEL_WS;
if (sd.has(w))