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

meow-7.2.2
Callum Prentice 2022-08-15 13:47:22 -07:00
parent 7b54cf3793
commit e7f562e6d8
1 changed files with 6 additions and 2 deletions

View File

@ -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()