Converted frequently occuring setting lookups to LLCachedControl

Added LLObjectList::getAvatar(LLUUID) for type-safe and quicker lookup
Added F32 overload to LLSD because using F64 needlessly is silly.
   (And its lack of F32 overload caused issues with LLCachedControl<F32>)
This commit is contained in:
unknown
2010-10-07 21:36:13 -05:00
parent 49e4959bf5
commit fe9a3d2ba2
41 changed files with 365 additions and 209 deletions

View File

@@ -392,13 +392,13 @@ void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids)
for (S32 i = 0; i < (S32)agent_ids.size(); i++)
{
LLUUID agent_id = agent_ids[i];
LLViewerObject* dest = gObjectList.findObject(agent_id);
if(dest && dest->isAvatar())
LLVOAvatar* avatarp = gObjectList.findAvatar(agent_id);
if(avatarp)
{
std::string fullname;
LLSD args;
LLNameValue* nvfirst = dest->getNVPair("FirstName");
LLNameValue* nvlast = dest->getNVPair("LastName");
LLNameValue* nvfirst = avatarp->getNVPair("FirstName");
LLNameValue* nvlast = avatarp->getNVPair("LastName");
if(nvfirst && nvlast)
{
args["FIRST"] = std::string(nvfirst->getString());
@@ -411,7 +411,7 @@ void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids)
}
else
{
llwarns << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << llendl;
llwarns << "llPanelGroupInvite: Selected avatar has no name: " << avatarp->getID() << llendl;
names.push_back("(Unknown)");
}
}