diff options
Diffstat (limited to 'indra/newview/llnameeditor.cpp')
-rw-r--r-- | indra/newview/llnameeditor.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/llnameeditor.cpp b/indra/newview/llnameeditor.cpp index 31c9b41f30..ca47e50899 100644 --- a/indra/newview/llnameeditor.cpp +++ b/indra/newview/llnameeditor.cpp @@ -58,7 +58,7 @@ LLNameEditor::LLNameEditor(const std::string& name, const LLRect& rect, void* userdata, LLLinePrevalidateFunc prevalidate_func) : LLLineEditor(name, rect, - "(retrieving)", + std::string("(retrieving)"), glfont, max_text_length, commit_callback, @@ -99,26 +99,26 @@ void LLNameEditor::setNameID(const LLUUID& name_id, BOOL is_group) setText(name); } -void LLNameEditor::refresh(const LLUUID& id, const char* firstname, - const char* lastname, BOOL is_group) +void LLNameEditor::refresh(const LLUUID& id, const std::string& firstname, + const std::string& lastname, BOOL is_group) { if (id == mNameID) { - LLString name; - - name.assign(firstname); + std::string name; if (!is_group) { - name.append(1, ' '); - name.append(lastname); + name = firstname + " " + lastname; + } + else + { + name = firstname; } - setText(name); } } -void LLNameEditor::refreshAll(const LLUUID& id, const char* firstname, - const char* lastname, BOOL is_group) +void LLNameEditor::refreshAll(const LLUUID& id, const std::string& firstname, + const std::string& lastname, BOOL is_group) { std::set<LLNameEditor*>::iterator it; for (it = LLNameEditor::sInstances.begin(); @@ -142,7 +142,7 @@ LLSD LLNameEditor::getValue() const LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) { - LLString name("name_editor"); + std::string name("name_editor"); node->getAttributeString("name", name); LLRect rect; @@ -162,7 +162,7 @@ LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory max_text_length, commit_callback); - LLString label; + std::string label; if(node->getAttributeString("label", label)) { line_editor->setLabel(label); |