summaryrefslogtreecommitdiff
path: root/indra/newview/llagentui.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-03-29 12:00:26 -0400
committerLoren Shih <seraph@lindenlab.com>2010-03-29 12:00:26 -0400
commit94e6e10739c8321b6fb651a109901380ef92975a (patch)
tree629fec2892c2bb0bce4f35f42ef4cad54408f174 /indra/newview/llagentui.cpp
parent46fe5d49caef6c8db3df9d88f0d0ec773ef28095 (diff)
EXT-6536 : Make LLVOAvatarSelf a singleton
Superficial cleanup to replace all instances of "LLVOAvatarSelf *avatarp = gAgent.getAvatarObject" with "gAgentAvatar".
Diffstat (limited to 'indra/newview/llagentui.cpp')
-rw-r--r--indra/newview/llagentui.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp
index 97e956c082..452a11b01e 100644
--- a/indra/newview/llagentui.cpp
+++ b/indra/newview/llagentui.cpp
@@ -49,12 +49,10 @@
void LLAgentUI::buildName(std::string& name)
{
name.clear();
-
- LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
- if (avatarp)
+ if (isAgentAvatarValid())
{
- LLNameValue *first_nv = avatarp->getNVPair("FirstName");
- LLNameValue *last_nv = avatarp->getNVPair("LastName");
+ LLNameValue *first_nv = gAgentAvatar->getNVPair("FirstName");
+ LLNameValue *last_nv = gAgentAvatar->getNVPair("LastName");
if (first_nv && last_nv)
{
name = first_nv->printData() + " " + last_nv->printData();
@@ -73,8 +71,8 @@ void LLAgentUI::buildName(std::string& name)
//static
void LLAgentUI::buildFullname(std::string& name)
{
- LLVOAvatarSelf *avatarp = gAgent.getAvatarObject();
- if (avatarp) name = avatarp->getFullname();
+ if (isAgentAvatarValid())
+ name = gAgentAvatar->getFullname();
}
//static