summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2022-08-15 13:47:22 -0700
committerCallum Prentice <callum@lindenlab.com>2022-08-15 13:47:22 -0700
commite7f562e6d8912573c255c8a6621c4f57d7df4b5c (patch)
tree59184710fd86614c587a3bc459dd4401de303bbd
parent7b54cf3793e79ade5fc8897e1060a988558da331 (diff)
Fix for SL-17695 'Give materials and textures imported by Material Editor a sensible name' - compile error on mac/clang because it's more picky - as it should be in this case
-rw-r--r--indra/newview/llmaterialeditor.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index ffeb2db4df..7b17fb5fdf 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -705,9 +705,13 @@ const std::string LLMaterialEditor::buildMaterialDescription()
}
// sanitize the material description so that it's compatible with the inventory
- LLInventoryObject::correctInventoryName(desc.str());
+ // note: split this up because clang doesn't like operating directly on the
+ // str() - error: lvalue reference to type 'basic_string<...>' cannot bind to a
+ // temporary of type 'basic_string<...>'
+ std::string inv_desc = desc.str();
+ LLInventoryObject::correctInventoryName(inv_desc);
- return desc.str();
+ return inv_desc;
}
bool LLMaterialEditor::saveIfNeeded()